User:OttomanReference/monobook.js

/* ================================================================================ * USEFUL STUFF * Source: User:Raylu/monobook.js */ function addlilink(tabs, url, name, id, title, key) { var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); na.accesskey = key; var pref = 'alt-'; if(((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1))      || navigator.userAgent.toLowerCase.indexOf( 'mac' ) != -1 ) pref = 'control-'; if(clientPC.indexOf('opera')!=-1) pref = 'shift-esc-'; if(key && title) na.title = title + ' [' + pref + key + ']'; else if(title) na.title = title; else if(key) na.title = '[' + pref + key + ']'; return li; } function addTab(url, name, id, title, key) { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; addlilink(tabs, url, name, id, title, key); }

/* ================================================================================ * WIKIFY * Based on: WikiProject User scripts/Tutorial */ function qwikifyIt { document.editform.wpTextbox1.value = "{"+"{wikify}}\n\n" + document.editform.wpTextbox1.value; document.editform.wpSummary.value = "Added wikification template"; document.editform.submit; } function addQwikify { if (document.title.match("Editing ")      && !document.title.match(" (section) - Wikipedia")       && !document.title.match("Editing User talk:")) { addTab("javascript:qwikifyIt", "wikify", "ca-wikify", "Mark for wikification", ""); } } if (window.addEventListener) window.addEventListener("load", addQwikify, false); else if (window.attachEvent) window.attachEvent("onload", addQwikify);

/* ================================================================================ * POPUPS * Source: Tools/Navigation popups */ document.write(' '); popupSubpopups = false; popupRedlinkRemoval = true;

/* ================================================================================ * ATLAS * Source: User:Dschwen/WikiMiniAtlas */ document.write(' ');

/* ================================================================================ * ANTI-VANDAL TOOLBOX * Source: User:Kbh3rd/Vandal warning toolbox * Slightly edited version here: edited */ document.write(' ');

/* ================================================================================ * EDIT COUNTER * Source: Kate's Tool */ gsKateInsertBefore = 'pt-mycontris'; // leave blank to append after "logout" function KateLink { var user = document.getElementById('pt-userpage').firstChild.firstChild.data; var li = document.createElement('li'); li.id = 'pt-kate'; var a = document.createElement('a'); a.appendChild(document.createTextNode('Edit count')); a.href = 'http://tools.wikimedia.de/~kate/cgi-bin/count_edits?dbname=enwiki&user=' + user; li.appendChild( a ); if (! gsKateInsertBefore) { // append to end (right) of list document.getElementById('pt-logout').parentNode.appendChild(li); }  else { var before = document.getElementById(gsKateInsertBefore); before.appendChild(li, before); } } if (window.addEventListener) window.addEventListener('load', KateLink, false); else if (window.attachEvent) window.attachEvent ('onload', KateLink);