MediaWiki:Gadget-removeAccessKeys.js: Difference between revisions
Content deleted Content added
mw-panel |
Enterprisey (talk | contribs) m fix formatting |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 6:
// **********************************************************************
// Imported from version as of: 2007-04-17T22:22:27
// Deactivating access keys, see [[Wikipedia talk:WikiProject User scripts/Scripts/removeAccessKeys|talk page]]
jQuery(document).ready(function($) {
var head = document.getElementById('mw-head');▼
if (head) removeKeys(head.getElementsByTagName('a'));▼
if (panel) removeKeys(panel.getElementsByTagName('a'));▼
var columnOne = document.getElementById('column-one');▼
if (!columnOne) columnOne = document.getElementById('mw_portlets');▼
if (!columnOne) return;▼
removeKeys(columnOne.getElementsByTagName('a'));▼
if (cactions) removeKeys(cactions.getElementsByTagName('a'));▼
var personal = document.getElementById('p-personal');
if (personal) removeKeys(personal.getElementsByTagName('a'));▼
}▼
});▼
var el;▼
▲ if (skin == "vector") {
▲ var head = document.getElementById('head');
▲ if(head) removeKeys(head.getElementsByTagName('a'));
if (!el.accessKey) continue;▼
if (!window.removeAccessKeys || removeAccessKeys.indexOf(el.accessKey) >= 0) {▼
▲ if(panel) removeKeys(panel.getElementsByTagName('a'));
el.accessKey = ''; // el.setAttribute('accessKey', ''); ▼
▲ } else {
$(el).updateTooltipAccessKeys();
▲ 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'));
▲})
▲ 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', '');
}
▲ }
}
|