Hot answers tagged

23

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


18

BUG: this script desperately wants me to downvote, what to do? warning:troll answer.


17

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


10

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


9

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


7

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


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.


6

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.


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


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

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


4

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.


4

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" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui....


4

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


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

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


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


4

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 http*://*.askubuntu....


3

This is really a great app :) I liked it very much. Can it be possible to also pass the user-id as a parameter somewhere, so that the link to original question get's linked with the referrer and would help in Announcer and Booster badge. Update - Answer to my own question above Updating the a href to required link would do the job here. Check this post ...


3

Stackapps works nice by using jQuery 1.4. But when I upgrade jQuery to 1.6.x it fails to show the output and giving error: "Syntax error, unrecognized expression: [href=http://app.stacktack.com/stacktack.min.css]" Check it with http://nazmulweb.com/sof (Now there is no error as I have edited the js part) And the working one is here with jQuery 1.4.x http:...


3

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


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

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


3

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 redirect_uri by default. I had "Desktop OAuth Redirect Uri" disabled which the javascript SDK uses. (Note the url posted in the question) Leaving this up here in ...


2

Soapi.JS Usage Introduction To use Soapi.JS, simply include soapi.js in your document. e.g. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="scripts/Soapi.js" ...


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



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