User:Eric Shalov/monobook.js
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.
// [[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');
simplePopups=false;
popupAdminLinks=true;
popupDelay=0.5;
// window.addEventListener( "load" , addPurgeButton , false );
// [[User:Eric Shalov/tracker.js]] - please include this line
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Eric_Shalov/tracker.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// Refer ISBNs to Amazon:
$(function() {
for (var i = 0; i < document.links.length; i++)
{
var ln = document.links[i].href.match(/isbn=(.*)/);
if (ln) {
document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1;
}
if ( document.links[i].target.match(/South (.*)/) ) document.links[i].target='BLAH '+RegExp.$1;
}
});
// Swap images:
//addOnloadHook(function() {
// for (i = 0; i < document.images.length; i++) {
// if(document.images[i].alt == "Wikimedia Foundation") {
// var now = new Date();
// document.images[i].src="http://www.ericshalov.com/wikitrack.php?now=" + //now.getTime();
// }
//
// if(document.images[i].alt == "Powered by MediaWiki") {
//document.images[i].src='http://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Hammer_and_sickle.svg/101px-Hammer_and_sickle.svg.png';
// }
//
// }
//});
//addOnloadHook(function() {
// document.getElementById("p-logo").innerHTML = '<a //style="background-image: //url(https://www.ericshalov.com/wiki-en-smurf.png);" //href="/wiki/Main_Page" //title="Visit the Smurfy Main Page! [z]" //accesskey="z"></a>';
//});
// Google search:
//addOnloadHook(function() {
// document.getElementById('searchform').action = //'http://www.google.com/search';
// document.getElementById('searchInput').name = 'q';
// document.getElementById('searchGoButton').name = 'btnG';
// document.getElementById('mw-searchButton').name = 'btnI';
// document.getElementById('searchGoButton').value = 'G';
// document.getElementById('mw-searchButton').value = 'Lucky!';
// var enwp = document.createElement('input');
// enwp.id = 'as_sitesearch';
// enwp.name = 'as_sitesearch';
// enwp.value = 'en.wikipedia.org';
// enwp.type = 'hidden';
// document.getElementById('searchform').appendChild(enwp);
// return false;
//});