All Questions
Tagged with javascript support
30 questions
5
votes
1
answer
162
views
How can I implement a method to call the SE API that handles backoff correctly?
I'm writing JavaScript (Node.js) code that calls the Stack Exchange API. One part of the API is that it may return a non-zero value for backoff, which essentially means "wait n seconds before ...
2
votes
0
answers
99
views
Uncaught channelUrl must be under the current domain
I'm developing a Stack Chrome extension that will make use of the API. I'm following the instructions on the API docs here.
My OAuth and host websites are set to stackexchange.com in my Stack Apps ...
1
vote
0
answers
48
views
How to get write access to Stack Exchange API? [duplicate]
I am trying to use Stack Exchange API to post upvotes and downvotes from my app. I have received the access token but not sure what to do with write_access
0
votes
1
answer
189
views
Getting 405 when trying to post a comment
I'm trying to post a comment to The API Sandbox, I did one using the interactive documentation, but when trying to use my own code, it doesn't work. Instead, I get status code 405 (Method not allowed)
...
1
vote
1
answer
2k
views
Is it possible to get the response from a form POST?
This is related to my XYZ app to write comments.
I found a much neater way to submit the request using forms:
function post() {
se_url='https://api.stackexchange.com/2.3/posts/'+se_postId.value+'/...
2
votes
1
answer
1k
views
Why doesn't my XMLHttpRequest call work in Excel?
I can make a simple API call in JavaScript using XMLHttpRequest:
<html>
<script>
function reqListener () {
out.textContent=this.responseText;
}
...
1
vote
0
answers
153
views
Extension; Access to layout and javascript of stackexchange network site instead of inject (Stacks is not defined)
Note: last update at the end of POST
I am developing an extension for community users.
Introduction:
The extension is under development on this github: https://github.com/IcarosNetSA/atsu
and these ...
1
vote
1
answer
1k
views
Why am I getting a 400 Bad Request error with this code?
I'm using this code (in an async function):
let about = await fetch("https://api.stackexchange.com/2.2/me?order=desc&access_token="+token+"&sort=reputation&site=gaming&...
3
votes
1
answer
337
views
What write in app access for sending data
Here is my app's code:
However, I get this error:
1
vote
1
answer
292
views
How to analyze and debug Stack Exchange's Javascript?
When writing userscripts, I often want to be able to look at what Stack Exchange's Javascript is doing. Getting to the code that the browser runs is easy enough - in the Network tab, I can see network ...
1
vote
1
answer
238
views
How should I try to detect when the Share dialog is open in a userscript?
I want to write a userscript that modifies the share dialog to add an extra field:
It's easy enough to retrieve and modify this dialog whilst it's on the page, but it gets added to the DOM only after ...
3
votes
1
answer
344
views
How do I actually begin to code, in Node, using the Stack Exchange API?
I am a noob at coding, so forgive me for this rather trivial question.
I am trying to make a program that can access the Stack Exchange API. Specifically I want to make a program that gets live ...
2
votes
0
answers
116
views
JavaScript API Library for StackExchange API?
I'm developing an application that integrates with the Stack Exchange Network for posting questions and importing whole discussions. Therefore I'm looking for a JavaScript library for the Stack ...
2
votes
0
answers
224
views
Stackoverflow Javascript Authentication error
Using the Stack Overflow javascript authentication API, I get this error:
Application Login Failure An error occurred while login into an
application.
Error Details
error description: ...
9
votes
1
answer
853
views
Getting "application not configured for implicit grants" error trying to setup website
I had a developer setup StackExchange auth for a site last year and that still works fine. I have cloned that site and am in the process of changing out all of the relevant names and keys to the new ...
3
votes
1
answer
124
views
Help with javascript SDK configuration
The following problem is REAL! All names have been changed to protect the innocent.
I have a site at "http://Something.github.io/MyRepository/Directory/index.html"
And I have my app configured like ...
2
votes
1
answer
75
views
Is there any API or documentation that would help my adding functionality to Q&A textareas?
I'm writing an userscript that should add some functionality to the main textarea (WMD) used to post and edit answers and questions. The functionality will usually need to do things like insert text ...
4
votes
2
answers
172
views
How to use the StackExchange object on a userscript?
This object seems to be available in all Stack Exchange pages and contains interesting information about the actual page, site, user, among others. Just type StackExchange on the console to check it ...
9
votes
3
answers
545
views
Stack Exchange userscript template / boilerplate
I find it annoying to have to type the entire list of Stack Exchange sites to include every single time I make a new userscript. Furthermore, jQuery isn't automatically included by default.
Is there ...
4
votes
1
answer
566
views
Javascript SDK channelUrl for local development [duplicate]
I am trying to get started with the Javascript SDK. I am developing on a web server on my local machine. I get a channelUrl-related error when calling SE.init.
My code:
SE.init({
clientId: ...
6
votes
1
answer
293
views
Stack Exchange API in Chrome extension
How I can connect my extension to the API? I tried to use this example code for connecting:
SE.init({
clientId: 1,
key: '?',
channelUrl: '?',
complete: function (data) { alert('...
3
votes
1
answer
5k
views
How to convert a (javascript) date to the API timestamp format?
When I am using this page for the Stack Exchange API /search path, I can see that it is generating time-stamps in this format:
fromdate=1380326400&todate=1380412800
What is this date format? How ...
2
votes
1
answer
291
views
Javascript SDK init fails on sytax error...why?
I'm writing a user script and I want to hit the SE API for something, but SE.init is failing without much feedback indicating what the issue is. According to the documentation, it should be ...
3
votes
1
answer
417
views
How do I get a GreaseMonkey/UserScript to interact with the Live Preview?
I've converted a script that I hope to get embedded on a StackExchange site (Lego Answers) to a GreaseMonkey/Userscript but I'd like to get it interacting with the live preview when creating or ...
2
votes
1
answer
239
views
Using the API directly from JavaScript
Is there any way I can use the API directly from JavaScript without any Server side proxy? I know of the inter-domain restrictions, but can we do it somehow in case of facebook API right?
2
votes
2
answers
898
views
Is something filtering 'document.cookie' in SO pages?
My colleague and I are developing an annotation tool for web resources. One way The user can us the tool is to click a special bookmarklet to view the current page with annotations added. The ...
5
votes
1
answer
169
views
What timezone is used in the API?
When a timestamp is used, for example the fromdate parameter in /questions, what timezone are dates in? Is the number supposed to be in milliseconds or in seconds?
To get the current time to pass as ...
5
votes
3
answers
164
views
Injecting HTML Into A Stackexchange Site
I am writing an application that injects some HTML into the page. I was wondering what the policy is for this. Is it ok or generally frowned upon?
2
votes
1
answer
322
views
Best way to calculate total badge count in Javascript?
I'm using Javascript and JSONP and want to find-out a user's total badge-count (i'm not using any libraries).
At first I naively added up the badge counts individually, but some user's have no badges....
7
votes
1
answer
1k
views
Is it safe to embed my API key into my javascript-only application?
I have an application I'm developing that's pure javascript and consumes the Stack API. My API key is embedded in the source which anyone could read. Is this safe?