Inheriting indention when pressing enter
What I'd like to suggest is that if you press enter, the indentation is copied from the line you're coming from, and then automatically put before the next line. This would make it a bit easier to type out code on SO. Of course this would create the problem that people who would want to end their code would be ...
Why not use this to add the button? It preserves the integrity of other buttons, and ensures that a button does not get added twice (for example, when in the review section, it will only add the buttons to the editors which don't have it.
//params: text: text of button
//params: callback: a function which takes id of textarea as argument(...
Okay, went ahead and banged out a script for this; Happy Christmas!
To install, click here (SE Edit Reasoner install at Github).
To preview the source, click here (SE Edit Reasoner preview at Github).
This userscript requires an engine that supports both @require and the various @granted APIs.
It was tested on Firefox + Greasemonkey and Chrome + ...
Markdown. While you could use HTML (just like you can in posts), each time you use HTML instead of Markdown to format a post, Evan Carroll rapes a little kitten and sticks another needle in his Jeff Atwood voodoo doll.
Wrt the <kbd></kbd> insertion, how about this simple scenario: user has Shift+Alt+P and wants to convert it to Shift+Alt+P
Current scenario: user highlights all three keys individually and highlights them one by one. Boring! :(
Proposed scenario: user highlights the entire string (Shift+Alt+P) at once, presses ...
This doesn't have anything to do with Stack Exchange pages, it's a browser thing and mostly a very good thing.
You can see that the page isn't doing it by:
(Re)load an appropriate Stack Exchange page (or any long page with a <textarea>).
Focus the textarea for keyboard input but use the mouse to scroll it out ...
It would be nice to have a script option to adjust the indentation size. I, for one, would probably find an indent size of two spaces helpful.
(Many questions I'm editing to correct indentation are not aligned nicely on four-space indents.)
This uses the jQuery .on(...) feature which is only available in 1.7 and up. Careers is still using an older version and you get an exception on every page right now with this installed.
We will be updating soon, but it would be nice if you could add a config page to turn it on/off for each site.
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 government work I think. (That's a United States idiom meaning it has the mediocre quality one might expect from the lowest bidder, but it works well enough.) Bear ...
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, but here's a simple stand-alone example from this script, which I originally wrote for SOUP but decided to also make available separately:
// re-run the ...
I've updated the description to reflect the new version of the userscript.
New features in 1.1
Side by side editing can be used when editing existing questions or answers.
Can be toggled on and off by clicking the new button again.
When turned on the editor is stretched to the current length of the preview.
Place to dump list of all mathjax sites.
I will take a look at these and determine which configuration to give to each one, and if they need extra buttons.
http://stats.stackexchange.com Dollars (Implemented 1.0.3)
http://math.stackexchange.com Dollars only(implemented)
Full list of supported buttons:
Buttons used in many sites
Encloses selection in $...$
Enabled on all supported sites
Keyboard shortcut: Alt-M
Works differently on electronics.SE (gives \$...$\ because these people talk about money as well and mathjax needs escaping)
Double Dollarify ($$)
Encloses selection in $$...$$
Enabled on all ...
I'd like to report a bug. I think I pointed that out already earlier, but since we are at version 3 now I thought I give it another try. (I have no idea about scripting this in the first place.)
Buttons and preview disappear when running the script. Here is a screenshot to illustrate the problem:
I am running it on Windows 7, Chrome 41.something with ...
With the recent network-wide HTTPS switch, the include's should change to:
// @include https://stackoverflow.com/*
// @include https://*.stackoverflow.com/*
Also, in case of editing a question in the review queues, I noticed that the script wasn't working. The problem was in this line:
$("#mainbar").on("keydown", ".wmd-input", function (evt) ...
You're abusing a browser action button. If you want to have an option page, just define it in your manifest as an option page. What you have now is an option page hidden behind a browser action button... :S
Try updating the css live. Not sure how your code works, but it makes it far easier to understand what various features do and if you're properly saving ...
Dialog to upload images using imgur directly from the WYSIWYG editor (currently have to use SE's image button on the original editor!)
Better support for <code> tags
Keyboard shortcuts for common buttons
Adding features from my Stack Exchange Editor Extra: a userscript to add extra features to the Markdown Editor ...
Yeah, that's annoying and a problem with text areas throughout the interwebz.
So, I went ahead and banged out a script for this; Merry Christmas!
To install, click here (SE WMD scrollbar killer, install at GitHub).
To preview the source, click here (SE WMD scrollbar killer, preview at GitHub).
This script expands away the vertical scrollbar for all open ...
This is either a bug or an incomplete feature. See:
What is the 'rev' dropdown supposed to do?
Stack Exchange Revisions Dropdown Does Nothing?
This extra dropdown seems to require:
That the post have had previous edits.
That the page mode editor is invoked.
This editor is the default for low-rep users under at least some conditions. (low rep still ...
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 one of those "This post has been edited" alerts, or triggered a spoiler, etc.)
To keep things simple and robust, I recommend just using an interval. EG:
As written, the script functions only on Stack Overflow. You can make it work on all Stack Exchange sites by changing the Metadata Block (the part at the beginning of the script) to the following:
// @name Force edit suggested reviews
// @namespace stackoverflow
// @description Allows you to bypass reviewing suggested edits ...
The markdown code supposedly lives at the pagedown project on code.google.com.
You may also find these files to be useful:
The commented, human readable version of wmd.js
The commented, human readable version of full.js
Personally, I find it easier to just use normal <textarea> processing followed by a call to StackExchange....
last_editor will be missing (empty) from the results when the last editor is a deleted user. This deleted user does not have to be the owner, or original poster, of a given question or answer.
For example, see this answer -- which looks like this in the API:
the script will refuse to run on MathJax-enabled StackExchange sites
Could you please get it to work for MathJax-enabled StackExchange sites? There are a lot of MathJax enabled sites, especially the science sites, and they could also make great use of this useful script.
There could be at least some way to enable this without hampering ...