Jump to content

User:Mumuwenwu/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mumuwenwu (talk | contribs) at 16:05, 20 May 2012 (Created page with ' addOnloadHook(function(){ if (skin == "vector") { var head = document.getElementById('head'); if(head) removeKeys(head.getElementsByTagName('a')); var panel...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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.
addOnloadHook(function(){ if (skin == "vector") {  var head = document.getElementById('head');  if(head) removeKeys(head.getElementsByTagName('a'));  var panel = document.getElementById('panel');  if(panel) removeKeys(panel.getElementsByTagName('a')); } else {  var columnOne = document.getElementById('column-one');  if (!columnOne) columnOne = document.getElementById('mw_portlets');  if (!columnOne) return;  removeKeys(columnOne.getElementsByTagName('a'));  var cactions = document.getElementById('p-cactions');  if(cactions) removeKeys(cactions.getElementsByTagName('a'));  var personal = document.getElementById('p-personal');  if(personal) removeKeys(personal.getElementsByTagName('a')); } removeKeys(document.getElementsByTagName('input')); removeKeys(document.getElementsByTagName('label')); })  function removeKeys(nodeList){  var el;        for (var i = 0; i < nodeList.length; i++) {                el = nodeList[i];    if (!el.accessKey) continue;    if (!window.removeAccessKeys || removeAccessKeys.indexOf(el.accessKey) >= 0) {      el.accessKey = ''; //el.setAttribute('accessKey', '');       if (el.title) el.title = el.title.replace(tooltipAccessKeyRegexp, '');    }  } }  //disable all keys
importScript('Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys');