User:Jesse Groppi/monobook.js

//Script for info tooltips, takes the title of a link and turns it into a span for CSS use. window.onload = function { var links = document.getElementsByTagName('span'); var n = links.length; for (var i = 0; i < n; i++) { if (links[i].id == "tooltip" && links[i].title != '') { // add the title to anchor innerhtml links[i].innerHTML += ' '+links[i].title+' '; links[i].title = ''; // remove the title }; } }

//Ais523's script to allow page additions to categories to be tracked in a watchlist

/* Category watch (User:ais523/catwatch.js); adds entries on the watchlist if a page is  added to a category (and is still in the category when the watchlist is checked). The entry will only appear if there is another page on the watchlist edited that day (if the addition  was the only change on that day, it's neglected). The recategorisation of a page in a watched category will also trigger the watching, even if it's a different category that's added or  removed (unless the watched category is removed); removals from the watched category can't   be detected.

A previous version of this script had a limit on the maximum size of a category that could be  watched; this limit no longer exists. Thanks to User:TheDJ for helping me make this compatible with more browsers and preference settings, and to Roan Kattouw for fixing 11275 and making this cheap on the servers.

Note that some users have had problems installing this in Internet Explorer; if the second cache bypass (after changing the category watchlist) doesn't work, deleting all your temporary Internet files seems to.

//

//WMF's userscript to add tabs to the bottom of the page function morelinks { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs); } if (window.addEventListener) window.addEventListener("load",morelinks,false); else if (window.attachEvent) window.attachEvent("onload",morelinks);

// Originally based on http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510 //See WikiProject User scripts/Scripts/Show last diff // addLastDiff function addLastDiff {   addPortletLink('p-cactions', 'http://www.wikieducator.org/index.php?title=' + wgPageName + "&diff=cur&oldid=prev", 'last', 'ca-last', 'Show most recent diff'); } addOnloadHook(addLastDiff);

//script from Wikipedia, adds an edit link to the intro section of a page if ((wgAction == 'view' || wgAction == 'purge') && wgNamespaceNumber >=0) addOnloadHook(function edittop_hook{ var h2s = document.getElementsByTagName('H2'); var h2 = h2s[0]; if (!h2) return; if (h2.parentNode.id == 'toctitle') h2 = h2s[1]; if (!h2) return; var span = h2.firstChild; if (!span || span.className != 'editsection') return; var zero = span.cloneNode(true); if (document.getElementById('featured-star')) zero.style.marginRight = '25px'; if (document.getElementById('spoken-icon')) zero.style.marginRight = '45px'; if (document.getElementById('protected-icon') && zero.style.marginRight) zero.style.marginRight = '70px'; var parent = document.getElementsByTagName('H1')[0]; parent.insertBefore(zero, parent.firstChild); var a = zero.getElementsByTagName('A')[0]; if (a.href.indexOf('&section=T') == -1){  a.title = a.title.replace(/:.*$/,': 0')   a.setAttribute('href', a.href.replace(/&section=\d+/,'&section=0')); }else{//transcluded   a.title = 'Edit section: 0' a.setAttribute('href', wgScript+'?title='+encodeURIComponent(wgPageName)+'&action=edit&section=0') } })