MediaWiki:Gadget-removeAccessKeys.js
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from version as of: 2007-04-17T22:22:27
//Deactivating access keys, see [[Wikipedia talk:WikiProject User scripts/Scripts/removeAccessKeys|talk page]]
$(function(){
var $nodeList = $('#mw-head a, #mw-panel a, #column-one a, #mw_portlets a, #p-cactions a, #p-personal a');
$nodeList = $nodeList.add('input, label').filter(function () {
return this.accessKey && (!window.removeAccessKeys || window.removeAccessKeys.indexOf(this.accessKey) !== -1);
});
mw.loader.using('mediawiki.util').then(function(){
$nodeList.removeAttr('accesskey').updateTooltipAccessKeys();
});
});