User:Hotbot/monobook.js
From Homestar Runner Wiki
< User:Hotbot(Difference between revisions)
Line 8: | Line 8: | ||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | ||
- | 'viewsource=1') != -1) { | + | |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | // [[User:Lupin/popups.js]] | ||
+ | //<pre><nowiki> | ||
+ | // VIEW SOURCE | ||
+ | addOnloadHook(function () { | ||
+ | if (location.href.indexOf('viewsource=1') != -1) { | ||
sl = document.getElementById('wpSummaryLabel'); sl.parentNode.removeChild(sl); | sl = document.getElementById('wpSummaryLabel'); sl.parentNode.removeChild(sl); | ||
ed = document.getElementById('wpSummary').parentNode; ed.parentNode.removeChild(ed); | ed = document.getElementById('wpSummary').parentNode; ed.parentNode.removeChild(ed); | ||
Line 21: | Line 33: | ||
li = document.createElement('li'); li.id = 'ca-viewsource'; li.appendChild(na); | li = document.createElement('li'); li.id = 'ca-viewsource'; li.appendChild(na); | ||
tabs.insertBefore(li,editbutton); | tabs.insertBefore(li,editbutton); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | //</nowiki></pre> |
Current revision as of 22:16, 7 July 2007
// Filter changes live // [[User:Lupin/recent2.js]] - please include this line document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/autoedit.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // [[User:Lupin/popups.js]] //<pre><nowiki> // VIEW SOURCE addOnloadHook(function () { if (location.href.indexOf('viewsource=1') != -1) { sl = document.getElementById('wpSummaryLabel'); sl.parentNode.removeChild(sl); ed = document.getElementById('wpSummary').parentNode; ed.parentNode.removeChild(ed); return; } editbutton = document.getElementById('ca-edit'); if (editbutton && location.href.indexOf('action=edit')==-1) { editlink = editbutton.getElementsByTagName('a')[0].href + '&viewsource=1'; tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; na = document.createElement('a'); na.href = editlink; na.appendChild(document.createTextNode('VS')); li = document.createElement('li'); li.id = 'ca-viewsource'; li.appendChild(na); tabs.insertBefore(li,editbutton); } }); //</nowiki></pre>