Make it work for everyone
![]() ![]() |
Instead of making GreaseKit users fiddle with their source, do something like this:
// Emulate GM_getValue's behavior of returning its second argument for Safari
if (GM_getValue === undefined) {
function GM_getValue () {
return arguments[1];
}
}
var headingFont = GM_getValue('headingFont', "'Helvetica Neue', Helvetica, 'MgOpen Moderna', sans-serif !important;");
var bodyFont = GM_getValue('bodyFont', "'Helvetica Neue', Helvetica, 'MgOpen Moderna', sans-serif !important;");
var user = GM_getValue('user', false);
var color = GM_getValue('color', '#0892D0');
var default_language = GM_getValue('default_language', 'en');
var international = GM_getValue('international', false);
Then use those variables throughout your script. This eliminates a bunch of function calls, which might even speed things up. This has the added advantage of not using Also, to give Linux users saner defaults, put something like Vera Sans before Helvetica, which is a raster font on Linuces. |
![]() ![]() |
Hmm... this was what I was thinking after I read through other scripts...
|



