Jump to content

User:UncleDouggie/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//importScript('User:UncleDouggie/smart watchlist.js');
//importScript('User:UncleDouggie/twinkle.js');

// for development purposes
mw.loader.load('http://localhost/smart watchlist.js');
mw.loader.load('http://localhost/twinkle/twinkle.js');

// User and page drop-down menus
mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Haza-w/cactions.js');

// For pop-ups
//importScript('User:Lupin/popups.js');

importScript('User:Kaldari/wikilove.js'); 

importScript('User:Dr_pda/prosesize.js'); //[[User:Dr_pda/prosesize.js]]

importScript('User:UncleDouggie/refToolbarPlus.js');

importScript('User:UncleDouggie/aiv-test.js');

// Enhanced cite button compatible with wikEd
//importScript('User:UncleDouggie/refToolbarWrapper.js');

// Open search results in a new tab by pressing Shift-Enter (or Shift-Click on dropdown suggestion):
$(function(){
 $('#searchform').bind('keyup keydown mousedown', function (e){ 
   $(this).attr('target', e.shiftKey?'_blank':'')
 })
})

// Popups
imagePopupsForImages=false;
popupActionsMenu=true;
popupOnEditSelection=true;
popupStructure='menus';
popupAllDabsStubs=true; 
popupRedirAutoClick='wpDiff';
popupDragHandle='popupTopLinks';
popupAdjustDates=true;
popupPreviewRawTemplates=false;
popupPreviewFirstParOnly=false;
popupMaxPreviewCharacters=1000;
popupLazyDownloads=false;
popupLazyPreviews=false;

// Normally features are enabled
var toFix = true;
 
// In special pages, histories and previews disable them
if (wgCanonicalNamespace == "Special" || /*
    */ location.href.indexOf('&action=history') != -1 || /*
    */ location.href.indexOf('&action=submit') != -1)
  toFix = false;
// 
popupRedlinkRemoval = toFix;
popupFixRedirs = toFix;
popupFixDabs = toFix;

// Options for gadget to convert talk page comment timestamps to local time
LocalComments = {
	dateDifference: true,
	dropDays: 93,
	dropMonths: 24,
	dateFormat: 'dmy',
	timeFirst: true,
	twentyFourHours: true,
	dayOfWeek: false
};

// Change color of various link types
// Colors are defined in [[User:UncleDouggie/vector.css]]
// Please keep the linkback comment so that Anomie can know who is using this.
importScript('User:Anomie/linkclassifier.js'); // Linkback: [[User:Anomie/linkclassifier.js]]

if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {};
TwinkleConfig.watchRevertedPages =    []; // don't watch reverted articles
TwinkleConfig.watchWarnings      = false; // don't watch user's talk pages
TwinkleConfig.loadDebugModules   = true;

/* For testing changes to popups. Need to directly load the CSS file here
var popScript     = 'http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:UncleDouggie/Gadget-popups.js';
var popStyleSheet = 'http://en.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=User:Lupin/navpopdev.css';

function popups_importScriptURI(url) {
	var s = document.createElement('script');
	s.setAttribute('src',url);
	s.setAttribute('type','text/javascript');
	document.getElementsByTagName('head')[0].appendChild(s);
	return s;
}
 
function popups_importStylesheetURI(url) {
	return document.createStyleSheet ? document.createStyleSheet(url) : popups_appendCSS('@import "' + url + '";');
}
 
function popups_appendCSS(text) {
	var s = document.createElement('style');
	s.type = 'text/css';
	s.rel = 'stylesheet';
	if (s.styleSheet) s.styleSheet.cssText = text //IE
	else s.appendChild(document.createTextNode(text + '')) //Safari sometimes borks on null
	document.getElementsByTagName('head')[0].appendChild(s);
	return s;
}
 
popups_importStylesheetURI(popStyleSheet);
popups_importScriptURI(popScript);
*/