Bruger:Lhademmor/drsport.js

Fra Wikipedia, den frie encyklopædi

Bemærk, efter at have gemt, er du nødt til at tømme din browsers cache for at kunne se ændringerne. Mozilla/Safari/Konqueror: hold shifttasten nede og klik på reload eller tryk på control-shift-r, Internet Explorer: ctrl-f5, Opera: f5.

 // ---------------------------------------
 // BEGIN CLEAR DR SPORT COOKIE
 function clearDRSportCookie()
 {
     if (document.getElementById("t-clearsport")) return;
     var li_current = document.getElementById("t-upload");
     if (!li_current) return;
     var li_next = li_current.nextSibling;
     var ul_node = li_current.parentNode;
     var li = document.createElement("li");
     li.setAttribute("id", "t-clearsport");
     li.setAttribute("title", "Fjern cookie, der fastholder DR Sport skin.");
     li.appendChild(document.createElement("a"));
     li.firstChild.setAttribute("href","#");
     li.firstChild.setAttribute("onclick","doClearDRSportCookie");
     li.firstChild.onclick = doClearDRSportCookie;
     li.firstChild.appendChild(document.createTextNode("Almindeligt skin"));
     ul_node.insertBefore(li, li_next);
 }
 addOnloadHook(clearDRSportCookie);
 function doClearDRSportCookie() {
     var c = document.cookie.split(';'), d;
     for (var i in c) {
         d = c[i].split("=");
         if (d[0].toLowerCase().indexOf('useskin') != -1) {
             document.cookie = d[0]+'=; expires='+new Date().toGMTString()+'; path=/';
             if (document.location.href.indexOf('useskin=') != -1) {
                 document.location.href = document.location.href.replace('useskin=','ignore='); 
             } else {
                 document.location.reload();
             }
             break;
         }
     }
 }
 // 
 // END CLEAR DR SPORT COOKIE
 // ---------------------------------------
<pre>
 // ---------------------------------------
 // BEGIN CTAP
/* Subpages incorporated from [[User:Bobblewik]]: 
[[Bruger:Lhademmor/peerreviewer.js]]
*/
//Create 'winc' function:

function winc(s) {
document.write('<script type="text/javascript" src="' 
             + 'http://da.wikipedia.org/w/index.php?title=' + s
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
}

//function to handle dates:

// winc('User:Bobblewik/monobook.js/dates.js');

//function to handle units:

// see next one - winc('User:Bobblewik/monobook.js/units_nbsp.js');

winc('Bruger:Lhademmor/peerreviewer.js')

 // 
 // END CLEAR DR SPORT COOKIE
 // ---------------------------------------
</pre>