User:Gan Luo/monobook.js

// tagger function commonsOK { document.editform.wpTextbox1.value += "\n"; document.editform.wpSummary.value = ""; document.editform.submit; } function nrd { document.editform.wpTextbox1.value += "\n{{subst:nrd}" + "}"; document.editform.wpSummary.value = "no rationale given"; document.editform.submit; } function nsd { document.editform.wpTextbox1.value += "\n{{subst:nsd}" + "}"; document.editform.wpSummary.value = "no source given"; document.editform.submit; } function addCommonsOK{ if (document.editform && wgCanonicalNamespace == "Image") { mw.util.addPortletLink("p-cactions", "javascript:commonsOK", "", ""); mw.util.addPortletLink("p-cactions", "javascript:nrd", "nrd", ""); mw.util.addPortletLink("p-cactions", "javascript:nsd", "nsd", ""); } } $(addCommonsOK);

// User:Lupin/popups.js - please include this line

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

popupDelay=0; popupAdminLinks=true;

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

document.write(' ');

/* */

/**** Initialize on window load ****/

$( myLoadFuncs );

/**** Load custom functions ****/

function myLoadFuncs {   if(!document.getElementById) return; // add a clock var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0]; addlilink(toplinks, '#', '', 'utcdate'); showtime; morelinks; }

/**** Add generic tab ****/

function addlilink(tabs, url, name, id){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.appendChild(na); tabs.appendChild(li); return li; }