User:Year2000Prob/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
function inc(file) { var lt = String.fromCharCode(60); var gt = String.fromCharCode(62); if (file.indexOf(".js") > -1) { document.writeln(lt+'script type="text/javascript" src="/w/index.php?title='+file+'&action=raw&ctype=text/javascript&dontcountme=s"'+gt+lt+'/script'+gt); } else if (file.indexOf(".css") > -1) { document.writeln(lt+'link rel="stylesheet" type="text/css" href="/w/index.php?title='+file+'&action=raw&ctype=text/css" /'+gt); } } function loadmonobook(user) { inc("User:"+user+"/monobook.css"); inc("User:"+user+"/monobook.js"); } inc("User:Topaz/init.js"); inc("User:Topaz/util.js"); inc("User:Topaz/comm.js"); inc("User:Topaz/wputil.js"); inc("User:Year2000Prob/statuschanger.js"); inc("User:Year2000Prob/usermessagechanger.js"); inc("User:Topaz/enhanceduserpage.js"); inc("User:Topaz/beta.js"); inc("User:Lupin/popupsdev.js"); document.write('<script type="text/javascript" src="' + 'http://de.wikipedia.org/w/index.php?title=Benutzer:ASM/quickedit.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); qeEnableAccessKeys = true; // installation of the wikEd editing page extension // install [[User:Cacycle/diff]] text diff code document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/diff.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Pilaf/Live_Preview]] page preview tool document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Mboverload/RegExTypoFix|RegExTypoFix]] common typo fixer document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/RegExTypoFix.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Cacycle/wikEd international]] English example translationn (disabled) // document.write('<script type="text/javascript" src="' // + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd_international_en.js' // + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Cacycle/wikEd]] editing page extension document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // Adds a purge tab. Imported from [[hrfwiki:User:Y2K/monobook.js]]. function addPurgeButton() { var href = document.location.href; { var historyHref = document.getElementById( "ca-history" ).firstChild.href; var div = document.getElementById( "p-cactions" ); var ul = div.getElementsByTagName( "ul" )[0]; var newLi = document.createElement( "li" ); var newA = document.createElement( "a" ); newA.setAttribute( "href" , historyHref.replace( "=history" , "=purge" ) ); var text = document.createTextNode( "purge" ); newA.appendChild( text ); newLi.appendChild( newA ); ul.appendChild( newLi ); } } if ( window.addEventListener ) window.addEventListener( "load" , addPurgeButton , false ); else if ( window.attachEvent ) window.attachEvent( "onload", addPurgeButton ); // This will add an [edit] link at the top of all pages except preview pages and the main page // by User:Pile0nades // Add an [edit] link to pages addOnloadHook(function () { // if this is preview page or generated page, stop if( document.getElementById("wikiPreview") || document.getElementById("histlegend") || document.getElementById("difference") || document.getElementById("watchdetails") || window.location.href.indexOf("/wiki/Special:") != -1 ) { if(window.location.href.indexOf("&action=edit§ion=0") != -1) { document.getElementById("wpSummary").value = "/* top */ "; } return; }; // get the page title var pageTitle = wgPageName; // create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = '<div class="editsection">[<a href="/w/index.php?title='+pageTitle+'&action=edit§ion=0" title="'+document.title.split(" - ")[0]+'">edit top</a>]</div>'; // insert divContainer into the DOM below the h1 if(window.location.href.indexOf("&action=edit") == -1) { document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]); } });