User:Polyglot/monobook.js
Jump to navigation
Jump to search
Note: You may have to bypass your browser’s cache to see the changes. In addition, after saving a sitewide CSS file such as MediaWiki:Common.css, it will take 5-10 minutes before the changes take effect, even if you clear your cache.
- Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
- Konqueror and Chrome: click Reload or press F5;
- Opera: clear the cache in Tools → Preferences;
- Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.
- This script lacks a documentation subpage. You may create it.
- Useful links: root page • root page’s subpages • links • redirects • your own
This JavaScript is executed for Polyglot on every page load, when User:Polyglot is using the Monobook skin.
popupAdminLinks=true;
popupOnEditSelection=false;
//Import local script asyncronously (to avoid slowing page load too much)
window.setTimeout(function () {importScriptURI('http://localhost/0/wt/javascript/creation.js');}, 100);
//importScript('User:Lupin/popups.js','en.wikipedia.org','114364398');
//importScript('User:Connel MacKenzie/mess-with-popups.js');
//importScript('MediaWiki:SectionWatchLinks.js');
//importScript('User:Conrad.Irwin/parser.js');
//importScript('User:Conrad.Irwin/iwiki.js');
importScript('MediaWiki:langcode2name.js');
//importScript('User:Conrad.Irwin/edittools.js');
//importScript('User:Connel MacKenzie/ajaxtranslinks.js');
//importScript('User:Conrad.Irwin/ipa2sampa.js');
//importScript('User:Conrad.Irwin/feedback.js');
//importScript('User:Conrad.Irwin/isblocked.js');
//importScript('User:Conrad.Irwin/aspell.js');
// importScript('User:Conrad.Irwin/citationstab.js'); in Common.js
//importScript('User:TheDaveRoss/CIDR.js');
if(wgPageName=='Special:Search'){
importScript('User:Conrad.Irwin/searchtoggles.js');
}
/*
importScript('User:Conrad.Irwin/navframes.js');
*/
document.onclick = function(){ document.beenUsed = true };
addOnloadHook(
function(){
if(!document.beenUsed){
var input = document.getElementById('bodySearchIput');
if(! input) input = document.getElementById('searchInput');
if(input)input.focus();
}
}
);
/* Let's see about those Tooltips */
$( function(){
for( var lnk in document.getElementsByTagName('a') ){
if(lnk.title && lnk.title.indexOf(':')){
lnk.title = lnk.title.replace(/^w:(.*)$/,"$1 on Wikipedia");
}
}
}
);
/*
$ (function () {
importExternalScript ('http://en.wikipedia.org/w/api.php?format=json&titles='+encodeURIComponent (wgPageName)+'&action=query&callback=replyFromWikipedia')
})
*/
function replyFromWikipedia (obj) {
exists = true;
try{
if (obj['query']['pages']['-1'])
exists = false;
}catch (e){
exists = false;
}
window.title+=exists
}