User:Fleela/monobook.js

function externISBN {

var magicURL = "http://www.librarything.com/isbn/MAGICNUMBER"; var magicRegex = /MAGICNUMBER/ig; if(wgPageName != "Special:Booksources" && wgPageName != "Wikipedia:Book_sources"){ for (var i = 0; i < document.links.length; i++) {              if( document.links[i].href.match(/isbn=(.*)/) ) { document.links[i].href=magicURL.replace(magicRegex, RegExp.$1); }   }  } }

addOnloadHook(externISBN);

importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); importScript('User:Seed_2.0/tags.js');

// 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") || document.getElementById("ca-viewsource") || window.location.href.indexOf("/wiki/Special:") != -1 ) {   if(window.location.href.indexOf("&action=edit&section=0") != -1) {      document.getElementById("wpSummary").value = "/* Intro */ ";    }    return;  };

// get the page title var pageTitle = wgPageName;

// create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = ' [edit intro] ';

// 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]); }

});

// User:Zocky/PicturePopups.js document.write(' ');

importScript('User:AzaToth/morebits.js'); importScript('User:AzaToth/twinklefluff.js'); importScript('User:AzaToth/morebits.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); importScript('User:AzaToth/twinklewarn.js'); importScript('User:AzaToth/morebits.js'); importScript('User:AzaToth/twinklediff.js'); importScript('User:AzaToth/morebits.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); importScript('User:AzaToth/twinklearv.js');

TwinkleConfig = { revertMaxRevisions             :       50, userTalkPageMode               :       'tab', showSharedIPNotice             :       true, openTalkPage                   :       [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert       :       false, openAOLAnonTalkPage            :       false, summaryAd                      :       " using TW", deletionSummaryAd              :       " using TW", protectionSummaryAd            :       " using TW", watchSpeedyPages               :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ], watchProdPages                 :       true, openUserTalkPageOnSpeedyDelete :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages             :       [ ], markRevertedPagesAsMinor       :       [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete         :       false, markWarningsAsMinor            :       true, markAIVReportAsMinor           :       true, markSpeedyPagesAsMinor         :       true, markProdPagesAsMinor           :       true, confirmUsernameToAIV           :       true, toolboxButtons                 :       [ ] };

/* Allows you to watch/unwatch a page without leaving it. */

function getXmlHttpObject { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest; } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }   catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }     catch (e) { xmlHttp = false; }   }  }  return xmlHttp; }

function changeTab { if (watchAction == 'watch') { watchLink.innerHTML = 'unwatch'; watchAction = 'unwatch'; } else if (watchAction == 'unwatch') { watchLink.innerHTML = 'watch'; watchAction = 'watch'; } }

function setWatch(action) { xmlHttp = getXmlHttpObject; if (xmlHttp == false) return; xmlHttp.onreadystatechange = changeTab; xmlHttp.open('GET', 'http://en.wikipedia.org/w/index.php?title=' + pageName + '&action=' + action, true); xmlHttp.send(null); }

function setWatchTab { if (document.getElementById('ca-watch') || document.getElementById('ca-unwatch')) { if (document.getElementById('ca-watch')) { watchLink = document.getElementById('ca-watch').getElementsByTagName('a')[0]; watchAction = 'watch'; } else if (document.getElementById('ca-unwatch')) { watchLink = document.getElementById('ca-unwatch').getElementsByTagName('a')[0]; watchAction = 'unwatch'; }     watchUrl = watchLink.href pageName = watchUrl.substring(watchUrl.indexOf('title=')+6,watchUrl.indexOf('&action')); watchLink.href = 'javascript:setWatch(watchAction);'; } } addOnloadHook(setWatchTab);