Hot answers tagged

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/* ...
user avatar
  • 1,269
7 votes
Accepted

Can I have a separate account just for testing my Stack App?

It's allowed with the caveat there's no guarantee it won't be merged, provided that you abide by the good faith criteria. If you attempt to actually run something like the script in your previous ...
user avatar
  • 4,666
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*://*....
user avatar
  • 213
4 votes

How to list your application/library/wrapper/script here

I have written a chat bot. Do I need to announce its existence on Stack Apps? No, it is not mandatory to announce your chat bot with a post on Stack Apps. It is appreciated if you do, specially if ...
4 votes
Accepted

How to set a userscript, listed here on Stack Apps, to auto-update by itself?

It's debatable whether this question is on topic here, but here is an approach that works in most cases (User has a quality script manager, like Tampermonkey‡, and default settings): Host ...
user avatar
  • 12.6k
4 votes
Accepted

Would it be possible to create a script that could be run manually to unprotect questions that meet certain parameters?

Yes, it is possible to create such a script and here it is: // ==UserScript== // @name Unprotect questions // @namespace https://meta.stackexchange.com/users/158100/rene // @version 0....
user avatar
  • 1,780
3 votes
Accepted

How can a userscript detect when a post's been edited in place, so that it can do stuff to the newly edited post?

The way SOUP handles this is by using a jQuery .ajaxComplete handler to detect when new content is loaded dynamically. SOUP actually has a set of wrapper functions that encapsulate this functionality,...
user avatar
3 votes

Looking for a script to show countdown timer below posts for easier edits

Here's a Greasemonkey / Tampermonkey script that'll run a stop watch until an edit reaches 5 minutes of age. Give it a try and see what you think. It might have bugs, but it's close enough for ...
user avatar
  • 321
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 (/...
user avatar
  • 952
2 votes

Problems opening a question link into an iframe

When an HTTP request to show a page is sent to the Stack Exchange web site, a check is explicitly made to ensure that returned page is not loaded into an <iframe>. The response header that ...
user avatar
  • 131
2 votes

How can a userscript detect when a post's been edited in place, so that it can do stuff to the newly edited post?

There should be a StackExchange method you could hook into, but I don't see it. Also, post text can change for a few reasons. (The user finished an edit, or clicked on a snippet button, or clicked on ...
user avatar
  • 12.6k
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, ...
user avatar
  • 12.6k
2 votes
Accepted

Sane limits for script that auto-loads new reviews for easier manual reviewing

From my personal observation and from the occasional SE dev statement, many items update every 60 seconds (cached at server). Also the page AJAX updates every 60 seconds. (using JS like: setInterval(...
user avatar
  • 12.6k
2 votes

JSChat, a chatbot library

feature-request status-completed Create a list of users that is currently in the room. Feature request completed.
2 votes
Accepted

Default Stack Exchange behavior interferes with my "Mark answers as favorites" code?

First can I say, you might want to use your own icon. Font Awesome is a very useful and easy to use icon toolkit that lets you add icons with simple CSS classes. You could use http://fontawesome.io/...
user avatar
  • 4,195
1 vote

How can I see how a Stack Apps summary looks for a particular app?

You can't. The summary is only visible on Homepage tabs or the /tagged/[tag] endpoint for a few tags. The following endpoints show the summary in the post list: https://stackapps.com/?tab=apps https:...
user avatar
  • 1,780
1 vote

Default Stack Exchange behavior interferes with my "Mark answers as favorites" code?

Don't use the default button. That's bad UI anyway. Add your own favorite button for each answer. And, since you will be using your own classes, like: <a class="myStarOff" href="#" data-ansID="...
user avatar
  • 12.6k
1 vote

Problems opening a question link into an iframe

You are not supposed to open Stack Exchange sites in an iframe and doing so might violate the terms of service. Also, attempting to do this is part of a technique used by cyber-criminals ("...
user avatar
  • 12.6k
1 vote
Accepted

Load answers to a question with review-like wrapper HTML

The method I ended up using in SOUP 1.10 is the first one listed above — loading the full question page and stripping it down to match the review interface. Here's the core of the actual code: var ...
user avatar
1 vote
Accepted

What to do with "OAuth Domain" in the registration page for a browser user script?

You're right, this is not very well documented. OAuth Domain is the domain of the URL where users are redirected after authenticating themselves. You specify this URL in redirect_uri parameter of your ...
user avatar
  • 126

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