Jump to content

User:JFreeman/monobook.js

From Wikipedia, the free encyclopedia
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.
//<nowiki> Admin-like RC Patrol tools

document.write('<script type="text/javascript" src="' 
             + 'http://wiki.riteme.site/w/index.php?title=User:VoA/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//</nowiki>[[Category:Wikipedians who use RC script ]]

mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript');

// [[User:Lupin/popups.js]]

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

// [[User:Dschwen/wikiminiatlas2.js]] - please include this line 
// document.write('<script type="text/javascript" src="' 
//     + 'http://wiki.riteme.site/w/index.php?title=User:Dschwen/wikiminiatlas2.js' 
//     + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// VIEW SOURCE
$(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('view source'));
    li = document.createElement('li'); li.id = 'ca-viewsource'; li.appendChild(na);
    tabs.insertBefore(li,editbutton);
  }
});