Tag Info

Hot answers tagged

19

Any chance for this to be packaged as a WordPress plugin/widget?


15

Using More Than One Site Per Page See Maxim Z's original question here. The StackTack plugin doesn't need to select the entire document to work, you can feed it any selection you like. $('div').stacktack(); The only requirement for an element to become a Tack is to have a valid StackTack ID. This affords you the ability to isolate Tacks to a certain ...


9

Posting On Tumblr I have recently updated the StackTack plugin to allow class-based Stack IDs to be used in situations where IDs can't be added to your html. This makes it possible to post Tacks on Tumblr now because classes are not sanitized from html posts on their service. Customize Your Theme Log into Tumblr and go to your dashboard. On the right, ...


6

Yes. Your API key identifies your application for stat tracking purposes more-so than security purposes. It is safe to leave in a plain text, user readable, format.


5

I think that we should be able to specify the API endpoint/site inside per-question options. Currently, the site can only be specified in global options. This means that all questions have to be from one Stack Exchange site. I think it'd be better if it would be possible to set a global site and then be able to set a per-question site that overrides the ...


5

Usage Example: Stack Exchange Site Monitor JavaScript Site Monitor in 20 lines of code or less.... Demonstrates the use of Soapi.js to query stackauth.com to get an up-to-date list of Stack Exchange sites and then polling /stats for each one on a revolving timer. $(document).ready(function siteMonitor() { var apiKey = ''; new ...


5

API V2 did this, we send down: Access-Control-Allow-Credentials: false Access-Control-Allow-Methods: GET, POST Access-Control-Allow-Origin: * With every response.


4

Very cool stuff! I'm going to be using it personally. Thanks for the hack! If there will be another version, here's what I hope will be in there (minor things, not really necessary): Layout of + and - votes looks more like the layout of what's shown to 1000+ rep members (slight css change) Making this into a Firefox plugin or a Chrome extension so it does ...


4

People love this. See all of the grease monkey scripts on meta: http://meta.stackoverflow.com/questions/tagged/greasemonkey


4

The date is Unix Epoch time, which is the number of seconds since 1/1/1970. The "time zone" is UTC, which is nearly equivalent to GMT. You can convert from UTC to local time in javascript using the method outlined here. Here are the functions I use to convert back and forth (code is C#): public static DateTime ConvertFromUnixTimestamp(double timestamp) { ...


4

Since the .getTime() value is already in UTC, you can just divide by 1000, and round. That is: var apiDate = Math.round (new Date().getTime() / 1000); works just fine. apiDate is in "unix epoch time" and the API takes these values even if the API parameter is called a "Date". But, if you want to truncate to the date only, just use: var dateTime = ...


3

Experimenting with StackTack on JSBin If you'd like to experiment with StackTack but don't want to install it on your blog or website, then check out this live editable demo on JSBin. Just hit the Preview button to see it in action. Javascript $(document).ready(function() { $(document).stacktack(); });‚Äč HTML <!DOCTYPE html> <html> ...


3

Tacks in Modal Dialogs This is an example of how to add a Tack to a modal dialog using JQueryUI's dialog widget. <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" ...


3

I've been asked to post my use of this app publicly so here it is: http://blog.tonywilliams.me.uk/clickonce-manifest-problem-with-net-4/ Must say it's a pretty good app that I plan on using a lot more.


3

The StackExchange "user" cookie (exact name varies by site) is Http-Only. Thus, it is not exposed (by compliant browsers, which are basically all of them now) in document.cookies. We do this to prevent the classic javascript injection -> stolen user credential attack.


3

This was even easier than I thought. Here is what you'll see after installing it: You can download the script by clicking here: http://files.quickmediasolutions.com/userscripts/owner.user.js Please let me know if it works!


3

There's a few ways to do it, but at first glance the simplest way would be to hook into the wmdrefresh event that will get called when the preview area is updated: $(document).bind('wmdrefresh', function (event) { // Make your changes to event.target's content }); Keep in mind that the preview update fires many, many times, so be sure to cache the ...


3

Response capability It would be nice if this app did not only show the Stack activites but gave a chance to respond them.


2

JSONP support was recently added to the API ( See this question ). The name of the parameter to trigger padding is jsonp: http://api.stackoverflow.com/0.8/tags?jsonp=blah


2

soapi.js vs soapi-vsdoc.js While the -vsdoc.js is quite large, it is never served. It is, if you are using Visual Studio, used to provide intellisense services, otherwise you may either delete it or keep it around as reference. The file that actually defines the domain types at runtime, soapi.js, is quite small, 9.5k packed, in that it only contains meta ...


2

Visual Studio JavaScript Intellisense and Code Completion Support Overview Included in the .zip is soapi-vsdoc.js. This file contains JavaScript code documented following the Visual Studio JavaScript Intellisense Documentation format. This file, while of special interest to users of Visual Studio, contains complete documentation of the API, including all ...


2

Is not finding me on any site: farseeker, main account is on SF no 7709 Site Username Reputation Match? Stack Overflow User Not Found 0 true Server Fault User Not Found 0 true Super User User Not Found 0 true Stack Overflow Meta User Not Found 0 ...


2

Paging Operations The majority of operation against the API involve paging operations. Most of the work and complexity of dealing with paged results have been encapsulated by the Route.GetPagedResponse() method. Soapi.RouteFactory("api.stackoverflow.com", apiKey) .Tags({ pagesize: 1 }) // contrived page size .getPagedResponse(function ...


2

Throttled Request Queue To provide transparent compliance with the throttle limite, Soapi.js includes an integrated throttled request queue. The queue is integrated into the library and is transparent, requiring no additional coding or consideration. The current default queue interval is 170ms. This means that, with the request queue and request cache, ...


2

Request Caching In the interest of application performance and to prevent inadvertent api 'abuse', Soapi.js includes an integrated request cache that stores the results of each unique request url for a default (and minimum) period of 60 seconds. The caching duration may be increased for individual routes as per your application's needs. e.g. perhaps your ...


2

the only people that have anything to say about it are your users. If your add-on succeeds it is ok, if it doesn't then they are probably frowning. ;-) For a producer of web content to frown upon an extension would be silly and would not typically be amongst your risks because there is nothing they can do about it, legally or otherwise. The content ...


2

Api Coverage Every path in the API has a reciprocal query rooted on the Soapi.Domain.Site object. The query syntax has been constructed to be as intuitive as possible. A complete map of Soapi.JS2 query path to API rest path follows. Api Routes /answers/{id} site.Answers().ById(704).invoke(/*handlers here*/); ...


2

Relational Queries When JSON results are received from the API, they are used to build domain objects from the Soapi.Domain namespace. Upon these objects are strategically placed queries, the same queries you will find rooted on the Site object, that are pre-keyed to return data for that object. NOTE: Query methods are upper-cased to make it clear that ...


2

ApiContext Query based Soapi.JS2 usage is rooted on the ApiContext object. This object maintains the list of Site that are available for query and provides central services. You gotta have one and it must be initialized. var context = new Soapi.ApiContext(apiKey); context.initialize(function onSuccess(){ // proceed }, function onFailed(error){ ...


2

Introduction to writing widgets: Writing a widget is very simple and I'll begin by describing a simple example below. Start by logging in to your account or registering if you don't have one. Click the link at the bottom of your page that says "To design a widget, click here." Enter the details of your widget, such as its name and title. For our example ...



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