Jump to content

User:Closeapple/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.
//  For NavPopups
popupFixDabs = true;
popupPreviewKillTemplates = true;
popupRevertSummaryPrompt = true;
popupOnlyArticleLinks = false;
popupMaxWidth = 600;

//  For [[Wikipedia:Comments in Local Time]]
LocalComments = {
  dateDifference: true,
  dateFormat: 'ymd',
  timeFirst: false
};

// [[User:Cacycle/wikEd]] in-browser text editor
// now in Preferences - don't need installer here - right?
var wikEdRegExTypoFix = true;
var wikEdScrollToEdit = false;

// User:Blue-Haired Lawyer/Footnote popups
importScript("User:Blue-Haired Lawyer/footnote popups.js");

// commented out: replacing with [[User:Pathoschild/Scripts/TemplateScript]] elsewhere
//// Meta:User:Pathoschild/Scripts/Regex menu framework
//// now in Wikipedia user preferences Gadgets
//// Settings in a different script so it doesn't clutter here:
//importScript("User:Closeapple/RMFset.js");
//// but trying here to see if the RMFset.js above it works:
////mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
//importScript('User:Smith609/toolbox.js');

// [[WP:HOTCAT]]
var hotcat_list_size = 15;  // rows in popup scroll list
var hotcat_use_category_links = true;  // up and down arrows

// [[User:Krimpet/CH2.js]] - CommonsHelperHelper
//importScript('User:Krimpet/CH2.js');

// Removing [[User:John Vandenberg/Deletion sorting tool]] because it may or may not work anymore, and [[User:Quarl/wikipage.js]] is really annoying on https URLs anyway
//// [[User:John Vandenberg/Deletion sorting tool]]
//importScript('User:Quarl/util.js');
//importScript('User:Quarl/wikipage.js');
//importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
//importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
//// importScript('User:AzaToth/twinkle.js');  // already loaded, in theory
//importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');

importScript('User:Fox Wilson/delsort.js'); // Deletion sorting script [[WP:FWDS]]

//
//  A function to pre-fill CommonsHelper from the dropdown menu in the Vector skin
//
function start_mtc() {
  if(mw.config.get('wgCanonicalNamespace') == 'Image' || mw.config.get('wgCanonicalNamespace') == 'File') {
    mw.util.addPortletLink('p-tb','https://tools.wmflabs.org/commonshelper/?interface=en&language='+ mw.config.get('wgContentLanguage') + '+&image=' + encodeURIComponent(mw.config.get('wgTitle')) + '&lang=en&commonsense=1&remove_categories=1&reallydirectupload=1&username=' + encodeURIComponent(mw.config.get('wgUserName')), 'CommonsHelper1','','move file to commons using commonshelper v1');
  }
}
addOnloadHook(start_mtc);