Jump to content

User:Aaron McDaid/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// <pre><nowiki>
/*
$(function () {
    // var mycustomsig = '~~~~'; // simple one removing the two hyphens.
    var mycustomsig =
             '[[User:Aaron McDaid|Aaron McDaid]]'
            +' <span style="font-size:smaller;">([[User_talk:Aaron McDaid|talk]] - [[Special:Contributions/Aaron McDaid|contribs]])</span>'
            +' ~~~~~';

    var toolbar = document.getElementById('toolbar');
    if (!toolbar) return;
    var links = toolbar.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
        links[i].href = links[i].href.replace(/--~~~~/,mycustomsig);
    }
});
*/

function toggleextra() {
/*
  h = document.getElementById("hoss");
  if (h.style.visibility=="hidden")
    h.style.visibility="visible";
  else
    h.style.visibility="hidden";
*/
}

function clickhandler() {
  alert('hi');
}

document.write("<style> #hoss font { color:blue; } </style>");

$(function () {
  unw = document.getElementById("ca-edit");
  if (unw != null) {
    li = document.createElement("li");
    unw.parentNode.insertBefore(li, null); // inserts at the end
    li.innerHTML = "<span id=hoss style='position:absolute;z-index:3;'>"
      + "<br><input id=pagename>"
      //+ "<br><input type=checkbox value=1 id=rememberpassword><label for=rememberpassword>talk</label>"
      + "<br><font onclick='clickhandler();'>t</font> <font onclick='clickhandler();'>v/h/e</font>"
      + "</span>"
      + "<a onclick='toggleextra();'>hoss</a>"
      ;
  }
});
// li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print {	margin-left: 1.6em; }

// </nowiki></pre>