Questions tagged [javascript]

Questions about usage of the Stack Exchange API in client-side browser JavaScript.

Filter by
Sorted by
Tagged with
25 votes
15 answers
3k views

OBSOLETE - Soapi.JS : fluent JavaScript client library for the Stack Exchange API

OBSOLETE This library uses the old API, and the soapi.info domain doesn't work anymore. There's still an archive on CodePlex. Soapi.js If you are looking for a full featured, compact JavaScript ...
Sky Sanders's user avatar
  • 12.1k
13 votes
12 answers
1k views

Soapi.JS2: a fully relational JavaScript client library for the Stack Exchange API - beta preview

Soapi.JS2 var context = new Soapi.ApiContext(yourApiKey); context.initialize(function() { context.official.stackApps .Users().ById(14) .invoke(function(users) { ...
Sky Sanders's user avatar
  • 12.1k
264 votes
12 answers
23k views

StackTack, a JavaScript widget you can stick anywhere

Screenshot / Code Snippet <head> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" ...
Soviut's user avatar
  • 3,333
9 votes
1 answer
797 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 ...
Lizza's user avatar
  • 193
16 votes
1 answer
876 views

OBSOLETE - StackAd - An Easy Way to Display Open-Source Ads on Your Site/Blog

Note: This page is due for an update but until then you can add StackAd to your site by adding: <script type='text/javascript' src='http://files.quickmediasolutions.com/stackad/stackad.min....
Nathan Osman's user avatar
  • 23.3k
13 votes
0 answers
2k views

Stack.JS - Powerful Event-driven Library for Accessing the Stack Exchange API in JavaScript.

About Stack.JS is the JavaScript equivalent of Stack.PHP and aims to replicate the request structure of that library as much as possible. The library is still a long ways from being complete but is ...
Nathan Osman's user avatar
  • 23.3k
9 votes
3 answers
517 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 ...
Doorknob's user avatar
  • 1,299
4 votes
1 answer
559 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: ...
joews's user avatar
  • 149
15 votes
1 answer
389 views

Support Cross-Origin Resource Sharing

Currently, the only way to call the API from javascript is to use JSONP, but this can be cumbersome and has security issues. If the following header was included in all API responses, the API could be ...
Gelatin's user avatar
  • 796
13 votes
0 answers
15k views

How to call the API via JSONP in Plain Old JavaScript

This tips demonstrates how to call the API in JavaScript without the need of jQuery or other frameworks. In a lot of cases you will find that the JSONP implementations provided in various frameworks ...
12 votes
1 answer
1k views

ThirdPlace JavaScript chat library

Screenshot / Code Snippet var room = ThirdPlace.Room.GetCurrentRoom(); var message = new ThirdPlace.Message; message.room_id = room.id; message.content = "ThirdPlace.js is a library which abstracts ...
Josh's user avatar
  • 563
10 votes
0 answers
254 views

StackTack - George Edison Remix (now with a few extra features!)

Screenshot About StackTack was originally listed here on Stack Apps. The idea was terrific and Soviut did such an awesome job building the application that I decided to fork it. My original ...
Nathan Osman's user avatar
  • 23.3k
6 votes
1 answer
238 views

OBSOLETE - StackAd Scroller

Screenshot About StackAd Scroller is a small web application that scrolls the open source ads from this Meta question. It is highly configurable and makes a nice page to leave your web browser open ...
Nathan Osman's user avatar
  • 23.3k
6 votes
1 answer
9k views

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

I am trying to experiment with the Stack Overflow API on my localhost and am struggling to get the authentication to complete. Here is my application JavaScript code (note that I am using IBM ...
MDalt's user avatar
  • 161
5 votes
1 answer
846 views

StackScript JavaScript Wrapper

Code Snippet Demonstrates the StackUser class: // Global object var ss = new StackScript(''); function GetInfo() { // The provided callback will be called // when the data arrives var ...
Nathan Osman's user avatar
  • 23.3k
2 votes
1 answer
265 views

What write in app access for sending data

Here is my app's code: However, I get this error:
Никита Башенко's user avatar
23 votes
2 answers
969 views

VoteCounts: bookmarklet to display up/down votes even for rep less than 1000

Screenshot / Code Snippet About This small bookmarklet will allow anyone to use the "vulnerability" of the API that it allows you to check the up/down vote count - a feat you could normally achieve ...
SztupY's user avatar
  • 713
18 votes
3 answers
2k views

OBSOLETE - Stack Insight - Track a User's Activity Over all Stack Sites

OBSOLETE - Site is dead. And domain has been un-hosted and/or parked since 2013. Screenshots About Web application to show how all a user has been involve in the different stack sites over time. ...
RichH's user avatar
  • 281
11 votes
0 answers
448 views

ArtOfChatbot + Chat API - a customisable chatbot

Stack Exchange chat has no API. While this is not a complete chat API, it introduces a level of control that makes it far easier to run chatbots. About ArtOfChatbot is a two-part creation: a basic ...
ArtOfCode's user avatar
  • 473
6 votes
1 answer
185 views

JavaScript SDK-based workflow never pushes message back from OAuth login_success page on Stack Exchange side

I'm using the JavaScript SDK by Stack Exchange provided with the latest API, and despite following the official instructions & examples it doesn't work - it seems there is a bug which breaks the ...
Mikhail Vink's user avatar
6 votes
0 answers
168 views

View close votes, reopen votes, and delete votes with insufficient repuation

Screenshot / Code Snippet About This script shows the number of current close votes, reopen votes and delete votes for a question. Works on all Stack Exchange sites. License GNU Lesser General Public ...
user avatar
5 votes
0 answers
396 views

ChatExchange - It is an API for Chat

Code Snippet sendMessage('chat.meta.stackexchange.com', 721, 'Hello @Sha', fkey().fkey) //Sends the message 'Hello @Sha' to Shadow's Den //Must be run in a chat site, due to @Balpha not wanting CORS ...
Universal Electricity's user avatar
5 votes
1 answer
489 views

Issue with JavaScript SDK

When using the JavaScript SDK to enable client side OAuth flow, I'm running into this issue: Uncaught TypeError: Cannot read properties of null (reading 'postMessage') And the page gets stuck with the ...
Sourabh Choraria's user avatar
5 votes
1 answer
268 views

Cannot authenticate with OAuth2

I was testing an app and suddenly I can't login any more. Neither my app or the Stack App configuration hasn't changed, so I'm thinking this might be a bug on the API side. The OAuth error seems a ...
gion_13's user avatar
  • 161
4 votes
2 answers
166 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 ...
brasofilo's user avatar
  • 992
3 votes
1 answer
120 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 ...
Jack Sprat's user avatar
3 votes
1 answer
349 views

Web SENotify - Stack Exchange website new question notification

Screenshot About This website is a notification tool of new question on Stack Exchange website. License Public Domain Download Download http://senotify.jeb.be/ content (html, css, js from) Platform ...
radius's user avatar
  • 473
3 votes
1 answer
402 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 ...
Zhaph - Ben Duguid's user avatar
2 votes
0 answers
208 views

StackExchange – Expand Hidden Comments

In principle that what Expand all comments script does, but with two major differences: Scrolls the page back to the initial target of the corresponding link you selected (i.e. to question, question ...
Gerold Broser's user avatar