9 votes

Stack Exchange userscript template / boilerplate

template.user.js // ==UserScript== // @name Stack Exchange Userscript (Template) // @grant none // @match *://*.stackexchange.com/* // @match *://*.stackoverflow.com/* // @match *://*.superuser.com/* ...
  • 1,269
5 votes
Accepted

Getting "application not configured for implicit grants" error trying to setup website

Yes, it can be annoying that the API docs, the javascript SDK, and the settings pages use the terms: "Explicit" "Implicit" "Server side" "Client side" a little interchangeably. (The first 2 are ...
  • 12.7k
4 votes

Stack Exchange userscript template / boilerplate

Here is a one for css too: // ==UserScript== // @name changeMe // @namespace http://use.your.homepage/ // @version 0.1 // @description addSomethingUseful // @match http*://*....
  • 213
4 votes

sechatr - adding Hangouts-style avatars to chat

What Gets Sent Madara Uchiha posted a comment asking about what information was being tracked. This answer should help clarify what's going on. The Client When the script sends a message to the ...
  • 22.8k
4 votes

Tab4SE - the TAB key in your post

bug After I have installed this userscript, I got the menu toolbar empty: Also I have got this in the console: jQuery.Deferred exception: t.find(...).unadornedButtonClick is not a function c@https://...
3 votes

What write in app access for sending data

From the documentation: Apps must have a registered Stack Apps post to write. The next sentence (about links pointing back) is no longer true, but the one after that is right and important too: You ...
  • 5,552
3 votes
Accepted

How should I try to detect when the Share dialog is open in a userscript?

Instead of polling for it, you can use a MutationObserver which exists for this exact thing: var observer = new MutationObserver(function(mutations, observer) { for (var i = 0; i < mutations....
  • 4,265
3 votes

Help with javascript SDK configuration

Of course as soon as I finally break down and ask a question I see my mistake: Applications that have the client side flow enabled can use https://stackexchange.com/oauth/login_success as their ...
3 votes

'The target origin provided does not match the recipient window's origin' message when trying to use localhost

I faced the same issue when I was using the stack exchange API to post a message to stack overflow website. I figured I had to post my application on a domain name. I hosted my application on free ...
3 votes

Stack Exchange userscript template / boilerplate

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 (/...
  • 962
3 votes
Accepted

Why doesn't my XMLHttpRequest call work in Excel?

The response from Stack Exchange is always compressed, as indicated by Glorfindel. Note that browsers offer the decompression to you by default but the MSXML2.serverXMLHTTP COM/OLE component pre-dates ...
  • 1,810
2 votes
Accepted

How to use the StackExchange object on a userscript?

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....
  • 12.7k
2 votes
Accepted

Getting 405 when trying to post a comment

The problem was the fact that I was using the http module, rather than https. Since its protocol is https, I have to use the https module const https = require("https") const data = `site=...
2 votes
Accepted

Is it possible to get the response from a form POST?

The problem you are experiencing is a standardized default behavior of <form> elements. When a form is submitted, under normal circumstances, navigation happens as one of the last steps of ...
2 votes

Tab4SE - the TAB key in your post

feature-request Could we enable this userscript in the edit page? When I try to edit anything (either question or answer), I don't see the option to turn on/off. Here is an example: I am not sure if ...
2 votes

Stack Exchange API in Chrome extension

I've built an extension that uses StackExchange API using OAuth2 flow. I did not use the JS SDK and did it manually instead. Here is how I did it: function auth(sendResponse) { const scope = '...
  • 121
2 votes
Accepted

Is there any API or documentation that would help my adding functionality to Q&A textareas?

The markdown code supposedly lives at the pagedown project on code.google.com. (Reference) You may also find these files to be useful: The commented, human readable version of wmd.js The commented, ...
  • 12.7k
2 votes

How do I actually begin to code, in Node, using the Stack Exchange API?

There is an example of how to invoke the constructor here: // app/src/resolvers.js const stackexchange = require('stackexchange-node'); const config = require('../config/config'); const options = {...
2 votes

How to analyze and debug Stack Exchange's Javascript?

Luckily for us, Stack Exchange's unminified Javascript is available on dev.stackoverflow.com. When you have a filename of the script you want to unminify (eg, from the network tab, you see https://cdn....
1 vote

Tab4SE - the TAB key in your post

bug status-completed Fixed in version 1.2. It doesn't work on Firefox with Windows 10, there is no option in the text box: I tried version 1.0 also. On closer inspection, I saw an error in the ...
  • 439
1 vote
Accepted

Why am I getting a 400 Bad Request error with this code?

An access_token is not enough; you need to specify a value for key as well. You can find it in the entry for your app here, this is how it looks like for one of mine: I'm not sure how it works in ...
  • 5,552
1 vote

How to use the StackExchange object on a userscript?

I'll report my findings based on Brock's answer and my tests. 1) I was using Scriptish. Well, don't. Once I moved to Greasemonkey many things that were working on Chrome's Tampermonkey (where I ...
  • 962

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