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 ...
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.
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 + ...
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 ...
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 ...
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.)
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) ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 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....
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:
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 ...
This functionality is not available in the official released version of the API (2.2), but since the Stack Exchange apps (now discontinued) do have this functionality, it must exist, right? Indeed, it's part of the undocumented 2.3 version of the API.
Somebody asked the same question on Meta Stack Exchange: Stack Exchange API returning 407: Account is not ...
Yes, you must provide all three of: tags, title, and body -- even if they haven't changed.
Otherwise you will get error messages like:
"error_id": 400, "error_message": "tags", "error_name": "bad_parameter"
"error_id": 400, "error_message": "title", "error_name": "bad_parameter"
"error_id": 400, "error_message": "body", "error_name": "...
Here is another solution that has been brought to my attention recently: Use Stackedit and this allows you to see the rendered output and the text input simultaneously. Furthermore, you can minimize the text input box to such an extent that it barely is visible at all.
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 ...