Trying to utilize the following bookmark as a Greasemonkey script to address an accessibility issue with stackexchange sites.
javascript:(function(){$('a,%20.vote-up-off,%20.vote-down-off,%20.star-off').attr({role:'link',tabindex:'0'});})()
However, when attempting to integrate it into the Greasemonkey script without the function(), it fails to work.
// ==UserScript==
// @name StackExchange access
// @description Enables y-aria stuff on stackoverflow
// @include *
// ==/UserScript==
$('a,%20.vote-up-off,%20.vote-down-off,%20.star-off').attr({role:'link',tabindex:'0'});
alert("worldzz");
The assumption is that there may be a need to somehow access the document object from within Greasemonkey, although the method for doing this remains unclear.
Confirmation of the script being executed is evident if the
$('a,%20.vote-up-off,%20.vote-down-off,%20.star-off').attr({role:'link',tabindex:'0'})
line is commented out and the alert triggers.