Jump to content

Wikipedia talk:WikiProject User scripts/Scripts/removeAccessKeys

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This script will disable browser access keys on Wikipedia pages. Gadgets installation:

Installation:


Example 1: disable z, f and . (dot) access keys

var removeAccessKeys = 'zf.';
importScript('Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys');


Example 2: disable all keys

importScript('Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys');

Gadget does not work with new Vector skin

[edit]

Hi. I could not find another place to report this problem, so I hope it is OK to report it here. I filed this as a bug against the Vector skin, but it was closed as INVALID, saying the gadget is responsible.

(https://bugzilla.wikimedia.org/show_bug.cgi?id=22092)

The "Disable access keys" gadget does not work with the Vector skin. It works with all of the other skins on the Wikipedia preferences page.

To repeat: - Log in to wikipedia.org - Go to "My preferences" page - Select the "Gadgets" tab - Choose "Disable access keys", and Save - Select the "Appearance" tab - Click "Preview" next to the Vector skin, and try an access key (on OS X, type <Ctrl-T>), and notice that it performs the Wikipedia action. - Click "Preview" next to another skin (e.g., Modern), and try the same access key. Notice that it does not perform the action.

Please allow this gadget to work with the Vector skin.

Redlever (talk) 19:34, 13 January 2010 (UTC)[reply]

Fixed —TheDJ (talkcontribs) 15:20, 20 January 2010 (UTC)[reply]
Adding a comment here in case somebody else finds this page the same way I did.
The Gadget does not work with the Vector skin again. Or, more precisely, it works with the "Vector legacy (2010)" skin but it does not work with the current default "Vector (2022)" skin. Gilijev (talk) 11:06, 2 February 2024 (UTC)[reply]

Simplified

[edit]

Hi. I just wrote a simplified alternative for the script that works better even. Would be nice be replaced with current script:

$(function () { $("[accesskey]").removeAttr("accesskey").each(function () { this.title = this.title.replace(/ \[alt-.*/, ''); }); });

(cc: TheDJ) –ebraminiotalk 16:50, 15 July 2014 (UTC)[reply]