Jump to content

User:Patrick87/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Patrick87 (talk | contribs) at 14:29, 10 May 2013 (debugging). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// ########## load global.js from dewiki for cross wiki usage ##########
mw.loader.load('//de.wikipedia.org/w/index.php?title=User:Patrick87/global.js&action=raw&ctype=text/javascript');



// ########## only for enwiki ##########

// Change "Upload file" link from [[Wikipedia:File Upload Wizard]] to [[Special:Upload]]
var d = document.getElementById("t-upload");
d.innerHTML = d.innerHTML.replace("wiki/Wikipedia:File_Upload_Wizard", "wiki/Special:Upload");

// Add preview button to upload form and preload with information template
if (mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload') {
    importScript("User:Patrick87/UploadForm.js");
}

// markAdmins (original source [[:de:Benutzer:PDD/markAdmins.js]])
importScript('User:Patrick87/markAdmins.js');
markcomadmins = true; // zusätzlich: Commons-Admins besonders hervorheben
markwdadmins  = true; // zusätzlich: Wikidata-Admins besonders hervorheben


LocalComments = {
    dateDifference: false,
    dateFormat: 'ymd',
    twentyFourHours: true,
    dayOfWeek: false
};