User:Mr. Berry/monobook.js

$(function{ 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' var parent = document.getElementsByTagName('H1')[0]; parent.insertBefore(zero, parent.firstChild); var a = zero.getElementsByTagName('A')[0]; a.title = a.title.replace(/:.*$/,': 0'); a.setAttribute('href', a.href.replace(/&section=1/,'&section=0')); })

function addLink(where, url, name, id, title, key, after) { // addLink accepts either an id or a DOM node, mw.util.addPortletLink only takes a node if (after && !after.cloneNode) after = document.getElementById(after); return mw.util.addPortletLink(where, url, name, id, title, key, after); }

/**** afd helper ****/ document.write(' ');

/* This is to keep track of who is using this extension: User:Jnothman/afd_helper/script.js */