Tag Info

Hot answers tagged

2

template.user.js // ==UserScript== // @name Stack Exchange Userscript (Template) // @grant none // @match *://*.stackexchange.com/* // @match *://*.stackoverflow.com/* // @match *://*.superuser.com/* // @match *://*.serverfault.com/* // @match *://*.askubuntu.com/* // @match *://*.stackapps.com/* // @match *://*.mathoverflow.net/* // ==/UserScript== var ...


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( ( ...


1

Here is a one for css too: // ==UserScript== // @name changeMe // @namespace http://use.your.homepage/ // @version 0.1 // @description addSomethingUseful // @match http*://*.stackoverflow.com/* // @match http*://*.serverfault.com/* // @match http*://*.superuser.com/* // @match http*://*.stackexchange.com/* // @match ...


1

Your value for channelUrl is nominally correct. If I set up my XAMPP server, via httpd.conf to use port 8000, then this HTML page works perfectly fine for me: <!DOCTYPE html> <html><head> <title>StackApps SDK auth test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ...



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