Tag Info

Hot answers tagged

1

The question is still not clear, please rewrite it like: I do X. I expect Y. But I get Z. Update: From the comments: Apparently the OP's problem really was that accessing StackExchange.options.routeName in the script, outside the injected code, caused a ReferenceError, when using Scriptish, not Tampermonkey and Greasemonkey as stated in the question. ...


1

I'm detecting which page we are using the StackExchange object: The property StackExchange.options.routeName can be (among other values): Questions/Show (/questions/POST-ID) Questions/List (/questions) Questions/ListByTag (/questions/tagged/TAG-NAME) So, to run a script only when viewing an individual post: var userscript = function($) { if( ( ...



Only top voted, non community-wiki answers of a minimum length are eligible