Bruger:Nico/common.js: Forskelle mellem versioner
Content deleted Content added
Nico (diskussion | bidrag) m fs |
updated scripts |
||
Linje 3:
/* Statistik box */
$(function addToToolbox() {▼
if (mw.config.get('wgCanonicalNamespace') != "Special") {▼
var pTb = document.getElementById("p-tb");▼
var pRef = pTb.cloneNode(true);▼
var pStats = pTb.cloneNode(true);▼
pStats.id="p-stats";▼
▲function addToToolbox() {
pStats.innerHTML = "<h5>Statistics</h5><div class=pBody><ul></ul></div>";▼
▲if (wgCanonicalNamespace != "Special") {
pTb.parentNode.insertBefore(pRef, pTb.nextSibling);▼
pTb.parentNode.insertBefore(pStats, pRef);▼
▲var pTb = document.getElementById("p-tb");
▲var pRef = pTb.cloneNode(true);
▲var pStats = pTb.cloneNode(true);
▲pStats.id="p-stats";
▲pStats.innerHTML = "<h5>Statistics</h5><div class=pBody><ul></ul></div>";
▲pTb.parentNode.insertBefore(pRef, pTb.nextSibling);
▲pTb.parentNode.insertBefore(pStats, pRef);
var escPageName = escape(wgPageName).replace('&', '%26');▼
▲ var escPageName = escape(mw.config.get('wgPageName')).replace('&', '%26');
addPortletLink("p-stats", "http://stats.grok.se/da/latest30/" +wgPageName, 'latest30', '', "Traffik nov 12");▼
addPortletLink("p-stats", "http://stats.grok.se/da/201311/" +wgPageName, 'Stats Nov 13', '', "Traffik nov 13");▼
▲ mw.util.addPortletLink("p-stats", "http://stats.grok.se/da/latest30/" +mw.config.get('wgPageName'), 'latest30', '', "Traffik nov 12");
▲ mw.util.addPortletLink("p-stats", "http://stats.grok.se/da/201311/" +mw.config.get('wgPageName'), 'Stats Nov 13', '', "Traffik nov 13");
▲ }
});
// [[User:Henrik/live-edit-counter]]
importScript('User:Henrik/js/live-edit-counter.js');
/**
* Ajax sysop
* @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
* @update-token [[File:pathoschild/ajaxsysop.js]]
*/
mw.loader.load('//
// ---------------------------------------
// BEGIN PATROLLINK for alle brugere
$(function linkPatrol() {
if (document.getElementById("n-patrol"))
return; var li_current = document.getElementById("n-recentchanges");
if (!li_current)
return; var li_next = li_current.nextSibling;
var ul_node = li_current.parentNode;
var li = document.createElement("li");
li.setAttribute("id", "n-patrol");
li.setAttribute("title", "Se ikke-patruljerede ændringer");
li.appendChild(document.createElement("a"));
li.firstChild.setAttribute("href","/w/index.php?title=Speciel:Seneste_ændringer&hidepatrolled=1");
li.firstChild.appendChild(document.createTextNode("Patruljér"));
ul_node.insertBefore(li, li_next);
});
▲//
// END PATROLLINK for alle brugere
|