Giter VIP home page Giter VIP logo

userscripts's Introduction

User Scripts

This repository contains various Tampermonkey (Chrome, Opera Next, Safari, Firefox) / Greasemonkey (Firefox) user scripts that add features to Stack Exchange web interfaces, such as the review queues, the chat room, and the Markdown editor.

Jump to:

SO Close Vote Request Generator

This script sends a [tag:cv-pls] message to the site's chatroom for the post you are currently viewing. It should work on any Stack Exchange site, if it doesn't then please submit an issue.

Use Case

Close Vote requests should be used when a question meets any of the following criteria:

  • Is in a low traffic tag, so unlikely to be closed naturally
  • Should be closed quickly, to avoid FGITW
  • Is old but attracting attention from new users

Otherwise, you should wait to see if it gets closed naturally. If the question doesn't get closed within a reasonable amount of time, then you can consider sending a close vote request. In general, large amounts of close vote requests from a single user in a short span of time is considered spam.

Sending a close vote request does not obligate any user to contribute a close vote, it is a request for others to review your close vote decision. Any user contributing their own close votes to questions you've requested a vote review for is doing so of their own prerogative. If a user thinks that you've supplied an incorrect reason or that the question is on-topic or can be easily edit into shape, they should tell you why. This does not mean that person is inherently any more correct than you are, it is an opinion.

Please use the reason that you voted or flagged! You are submitting a request for review of your close vote decision. Users will reply to your review request based on the reason that you enter. If you don't have 3000 reputation yet (and don't have close votes) you should be submitting requests for the close reason that you flagged it to be closed for. This is an educational tool for all of us to learn exactly what is on-topic and what is off-topic.

Installation

To install this script click here or otherwise visit the following URL, and Greasemonkey/Tampermonkey should ask you to install it.

 https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/SECloseVoteRequestGenerator.user.js

Updating

This script has an auto-update feature. It will check for a new version every time the script is run, don't worry it is a very lightweight request. If there is an update available, the script will ask you if you want to install it automatically or not. If not, it will not remind you for that version.

To update manually you can visit the above URL again, or select Check for updates from the cv-pls menu.

Issues & enhancement requests

Before raising new issues, please review the currently known issue list.

To report a new issue or request an enhancement, create a GitHub Issue Report using this template (requires a GitHub account).

As an alternative, you may send a Pull request for your own fixes or enhancements.

Target Chat Room

The default chat room is SO Close Vote Reviewers.

The room URL that you enter into the input field must be a valid chatroom URL. The script will yell at you if it is not.

When the room selection menu is closed, the link will have the name of the current room. When the room selection menu is open, the link will say "Set target room:". Clicking on the link will open and close the room selection menu.

Copy the chatroom URL from your address bar and paste it into the input field below the room list. Clicking Set adds the room to the room list and sets it as the default room for that site. Per-site metas and Stack Exchange sub domains each have their own settings.

Sending Requests

Requests generated by this script will be in the following format and can be sent whether you are in the target room or not, as long as you have write access.

[tag:cv-pls] reason [title](url) - [user](url) time
  1. Select Send request from the cv-pls menu.
  • Or press Ctrl+Shift+A
  1. Enter your reason into the input provided.
  • Any markdown that is acceptable in chat is acceptable in the reason dialog.
  1. Click Send or press Enter to submit the request.

A notification will pop-up if the request was sent successfully.

Short Reasons

This script has a short reason replacement feature. The script will split the reason that you entered by space characters, any piece of the string that is an exact match for any of the following letters will be replaced with its corresponding long reason.

  • t: too broad
  • u: unclear
  • p: pob
  • d: duplicate
  • m: no mcve
  • r: no repro
  • s: superuser
  • f: serverfault
  • l: library/tool/resource

SO Close Vote Request Generator (bookmarklet)

In some environments it's not possible to install user scripts. In order to facilitate making cv-pls requests in such situations, there's a version of the SO Close Vote Request Generator as a bookmarklet.

Using the bookmarklet:

You will be prompted to enter a reason for the request. After entering the reason, the text for the formatted cv-pls will be copied to the clipboard. If the bookmarklet was unable to copy the text to the clipboard, a notification will be displayed at the top of the page from which you can copy the text.

Creating the bookmarklet:

In most browsers, but not Edge, you can add a bookmarklet by creating a bookmark/favorite and changing the URL/location to the minified version of the bookmarklet below. The bookmarklet is minified in order to fit in the 2088 character limit imposed by some browsers (e.g. IE, Edge). The minified version of the bookmarklet is:

javascript:void(function(){function t(){try{history.replaceState({},'',a)}catch(t){}}var e,o={t:'Too Broad',u:'Unclear',p:'Primarily Opinion Based',o:'Opinion Based',d:'Duplicate',m:'No MCVE',r:'Typo or Cannot Reproduce',g:'General Computing',s:'Super User',f:'Server Fault',l:'Request for Off-Site Resource',get:function(t){var e=t.split(' ');return e.forEach(function(t,r){e[r]=o.hasOwnProperty(t)&&'get'!==t?o[t]:t}),e.join(' ')}},r=window,n=r.location,a=n.href,s=$(r),i=s.scrollTop(),l=StackExchange.notify,c=($('.special-status .question-status H2 B').filter(function(){return/hold|closed|marked/i.test($(this).text())}).length?'reopen':'cv')+'-pls',u='https://'+n.hostname,p=window.prompt('Request reason:','');if(p){p=o.get(p);var h,g='['+$('#question-header h1 a').text().replace(/(\[|\])/g,'\\$1').replace(/^\s+|\s+$/gm,'')+'‭]('+u+$('#question .short-link').attr('href')+')',d=$('.post-signature:not([align=\'right\'],#popup-close-question .post-signature) .user-details').text().trim().match(/[^\n]+/)[0].trim(),f=$('#question a.post-tag').first().text(),m=$('#question .owner:not(#popup-close-question .owner)'),v=$('a',m);v.length&&(d='['+d+']('+u+v.attr('href')+')');var y=$('.relativetime',m);y.length&&(h=y.attr('title'));var w='[tag:'+c+'] [tag:'+f+'] '+p+' '+g+' - '+d+(h?'‭ - '+h:''),x='<textarea class=\'cvrg-result\' style=\'width:95%;display:block;margin:10px auto;\'>'+w+'</textarea>',T=$(x).appendTo(document.body),q='The text for your '+c;try{if(T[0].select(),!(e=document.execCommand('copy')))throw 1;var C='been copied to the clipboard.',O=q+' has '+C;l.show(O,483912),setTimeout(l.close,3e3,483912)}catch(t){var S=q+' is:',b=x,k='It has '+(e?'':'NOT ')+C;try{l.show(S+b+k+' You can press Ctrl-C now to copy it.',483912)}catch(t){alert(S+'\n\n'+w+'\n\n'+k)}}T.remove(),s.scrollTop(i),loopCount=0,setTimeout(function e(){loopCount++;var o=$('.cvrg-result');o.length?(o[0].select(),t()):loopCount<100?setTimeout(e,200):t()},200)}else t()}())

You can see the non-minified version of the bookmarklet.

For some reason, Edge does not permit directly creating bookmarklets. In Edge, you must import the bookmarklet from the bookmarks file. You will need to save that file to your system and then use Edge's settings->Import from another browser->Import from file. You will probably then want to click on "View imported favorites" in order to move teh cv-pls bookmarklet to the location you desire.

Other browsers can also import from the .html file, but don't need to.

Magic™ Editor

This is our own fork of the Stack Exchange Editor Toolkit.

The Magic™ Editor helps you make substantial edits to posts, by identifying and correcting many common mistakes. Ultimately, you are responsible for your edits, so a key feature of the Magic™ Editor is a Diff Viewer, which is engaged automatically when you Invoke the Magic™.

Installation

To install this script click here or otherwise visit the following URL, and Greasemonkey/Tampermonkey should ask you to install it.

 https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/Magic%E2%84%A2Editor.user.js

Updates

This script uses the auto-update features of Tampermonkey / Greasemonkey. Your monkey will notify you usually within a couple of days when a new version becomes available.

To update manually you can visit the above URL again, or check for updates in Tampermonkey or Greasemonkey.

Issues & enhancement requests

Before raising new issues, please review the currently known issue list.

To report a new issue or request an enhancement, create a GitHub Issue Report using this template (requires a GitHub account).

As an alternative, you may send a Pull request for your own fixes or enhancements.

User's guide

REMEMBER: Magic™ Editor is an editing aid, but you are responsible for your edits. Don't just click-and-go; always review your edits.

Rather than 2,000 words, here are two pictures to explain basic use.

The Magic™ wand appears on the editor tool bar when the Magic™ Editor is available for use.

Magic™ wand

When you click the Magic™ wand, the display changes to show the applied updates in a diff view.

After the Magic™

Usage tips

Before invoking the Magic™, you should:

  • Check that any code in the question is properly indented, so Magic™ Editor treats it as code, not prose.
  • Likewise with any in-line code statements, which are best enclosed in backticks (`).

Afterwards, you should:

  • Review the results in the Diff view.
  • Manually revert any automatic changes that were inappropriate for the current post. Consider these examples:
  • If removal of tags from the title made the title too short, you will need to replace the entire title with a good one.
  • Watch for undesired case changes, especially when the original post included any words in all-caps. (All Magic™ Editor spelling corrections are in lower case, except for the first character which remains as-is.)
  • Note any mistakes that were missed; if they are common enough, you could report them as outlined earlier. (Rule of thumb: a "common" error will appear in at least a thousand posts on Stack Overflow, which is about 0.005% of them, OR occur daily.)

Supported Corrections

At this time (4 Feb 2016), Magic™ Editor has:

  • Rules for tidying question titles; tags are removed from the beginning and end, all caps titles are converted to Sentence case.
  • 97 Trademark spelling & capitalization rules (e.g. "JavaScript", "MySQL", and "WordPress").
  • 255 Spelling rules, many of which can fix multiple words.
  • 55 Acronym capitalization rules (e.g. "HTTP")
  • 25 Grammar rules addressing sentence capitalization, proper use of "a" vs. "an", spacing, comma usage, improperly formatted contractions ("Im", "ie", "eg", "etc", etc.), and common broken English (e.g. "I am wanting...").
  • 12 Noise-reduction rules to remove fluff that adds nothing of technical value to posts.
  • Automatic correction of numbered-list item layout.
  • Editor support for shifting text (indent / outdent).

Better handling of indentation and the TAB key when editing postsref

Included script (c) 2012 Benjamin Dumke-von der Ehe, under MIT Licence

This user script changes the behavior of a few keys (most notably the Tab key) within the post editor to behave more like it does in IDEs or text editors:

  • When one or more lines are selected, Tab and Shift-Tab indent and outdent these lines

  • When nothing is selected, Tab and Shift-Tab insert or remove whitespace to align the cursor on a tab boundary

  • When the cursor is within the left margin of a line, Backspace removes whitespace to align the cursor on a tab boundary (in other words, it may delete more than just one space character)

  • On indented lines, the Home key toggles the cursor between the actual beginning of the line and the beginning of the real content (in other words, it jumps back and forth to before and after the leading whitespace). This only happens on lines that are indented by at least four spaces or a tab, since it can be confusing for the following reason: When you press Home in the text editor, you expect the cursor to jump to the beginning of the line as it is displayed, which (due to wrapping) may be different from the actual previous newline character.

  • So that you don't have to reach for the mouse to tab out of the editor, you can press and release the Ctrl key, and the next key press will not be intercepted; thus Tab takes you out of the editor. Pressing and releasing Ctrl will grey out the text editor until the next keystroke to clarify this. If you think this is too awkward, I'm open to other suggestions, but there should be some way to tab out of the editor .

Note that this will never insert TAB characters, only spaces. It does however handle already-present TABs, and it handles them the same way the Markdown converter does.

userscripts's People

Contributors

anwarshah avatar aralun avatar arcticecho avatar astrocb avatar basicnullification avatar durron597 avatar ferrybig avatar gunr2171 avatar machavity avatar madarauchiha avatar makyen avatar mdoubledash avatar mkrieger1 avatar mogsdad avatar oaphi avatar patrickhofman avatar paulroub avatar purplemagick avatar richardslater avatar rschrieken avatar sathyabhat avatar shah-nisarg avatar sri-shree avatar surajrao avatar thomas-daniels avatar tiny-giant avatar tripleee avatar tunaki avatar tyler-h avatar unihedro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

userscripts's Issues

Do not post 'cv-pls' in room meetings.

As the title states, the 'cv-pls' button should be locked when a scheduled room meeting is happening. This stops the meeting from being interrupted (and the requests from being sent to the trash), so therefore effectively improves the focus of the meeting.

Edit/Update Removal can eliminate too much white space.

Script: Magic™ Editor
Issue type: Bug
Link to example post: (where can the problem be reliably replicated?)

This:

Generally i need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).


**UPDATE**

> Spring WS offers "only" contract-first, starting from an XSD Schema

...gets changed to this:

Generally I need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).> Spring WS offers "only" contract-first, starting from an XSD Schema

...it should be this:

Generally I need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).

> Spring WS offers "only" contract-first, starting from an XSD Schema

...but the white space between the Block-quote and the preceding sentence has been removed.

Observed in this edit, for example.

With App.globals.showRules = true;, isolated the problem to an apparent interaction between two rules, editupdate and blanklines, shown below. Debug info didn't show any unexpected replacement, so perhaps there is a third player? (Placeholder logic, maybe?)

With either rule disabled, there's no problem (but that the rule isn't doing its job).

        editupdate: {
            // https://regex101.com/r/tT2pK6/9
            expr: /([-_*]+[\t ]*\b(edit|update)\b([\t ]*#?[0-9]+)?[\t ]*:*[\t ]*[-_*]+:*|[\t ]*\b(edit|update)\b([\t ]*#?[0-9]+)?\s*:+[\t ]*)/gi,
            replacement: "",
            reason: App.consts.reasons.noise
        },

...
        blanklines: {  // https://regex101.com/r/eA5hA2/2
            expr: /^(?: *[\n\r\f])+|(?: *[\n\r\f])+$|((?: *[\n\r\f]){2})(?:(?: *[\n\r\f]))+/g,
            replacement: "$1",
            reason: App.consts.reasons.layout
        },

This might be related to issue #39 , in that the placeholders / block replacement logic could be involved.

(Migrated from old repository #115.)

The "remove tags from title" rule in Magic Editor is overzealous

I had a question the following title:

communication between JS, PHP and MySQL

and Magic Editor turned it into

Communication between JavaScript,

I think it should only remove tags from titles if they are in the beginning, not somewhere in the middle or at the end.

Another example:

Pass js values to php

was changed to:

Pass JavaScript values to

CV request generator inactive after editing

I don't yet have a solid test case but just now, after I edited a question and then tried to cast a close vote, I did not see a "send cv-pls request" checkbox in the close reason dialog. Reloading the page by clicking the question title and then reopening the close reason dialog brought it back.

cv-plz prompts for update after updating

There is a new version up. The new version contains the auto updater. If you could test it out for me by installing that version then change VERSION = '1.2' to VERSION = '1.1'. It should check once per day. If it says there is an update, try clicking cancel. Then select [Check for updates] from the menu. It should alert you of the update again. Then clicking [OK] should open a new tab to install the update. /Tiny

Performed the above test, starting with version 1.3. Performed multiple downgrade / upgrade cycles, and saw only one issue, the subject of this report.

  • Installed v 1.3, was previously running a v 1.0 from Tiny's own gh repo. Uninstalled the old version.

  • Loaded a question in another tab, validated that v1.3 was running by clicking cv-pls and observing the new 3-item menu.

  • In GreaseMonkey, edited then saved user script.

    // @version      1.1
    ...
    var CURRENT = '1.1';
    

    Left GM editor open, because by re-saving the edited version I could perform "downgrades" for retesting.

  • Back to question, reloaded page. Was prompted for update, as expected. Cancelled.

  • Clicked cv-pls and selected Check for updates. Was alerted of update, as expected.

  • Updated, and confirmed update in GM.

  • Back to question, reloaded page. Was prompted for update. <-- Suspected Bug

  • Updated.

I have not been able to reproduce this again; I can downgrade & upgrade repeatedly now.

So, what happened? Theories...

  • The "once per day" rule was in place for my first test, which explained the first notification when a question was opened, triggering the user script. Maybe cancelling that upgrade leaves an opening a the "once per day" check to run again.
  • The first time I installed the new script, it didn't upgrade the previous version I had because it was from a different source. TM showed both as unique scripts, and I was able to remove the old one. Maybe there was some other interplay between them, perhaps via HTML5 storage.

Since the problem isn't persistently repetitive, it's a low impact issue.

Close vote request script shows "Invalid chat room" for rooms from stackexchange domain in chrome

When I wanted to change the default "SO close vote reviewers room" it says Invalid chat room. The room url is of course valid and works in Firefox.

When inspected, chrome shows a messages like this

refused to connect to "http://chat.stackexchange.com/rooms/0000/chat-room-name": URL is not part of the @connect list

I could fix the problem by just adding another line with chat.stachexchange.com domain.

(The room name I used here is a made-up name, but I used an active room. Even a room I owned)

cv-pls menu remains visible when abandoned

Simple reproduction:

  1. Click cv-pls action when viewing a question. Observe menu pop-up.
  2. Abandon the action, by doing something else. For example, click share action. Observe that the pop-up menu remains visible.

screenshot

I first noticed this by choosing to "Send Request", then hitting cancel in the resulting dialog.

Pretty print code

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: n/a

DavidG brought this up in chat.

See How can we avoid “overhang” code indentation?

Since the general message from that meta post is that automatic reformatting is difficult and bad, Magic Editor should not make magical changes to code. (Yay! Done that part already.)

However, providing the ability to farm out reformatting to a web service, under user control, might be really handy.

And DavidG wants a button. Maybe two or three. Make them big and shiny.

(Migrated from old repository #110.)

A vs An - Magic™ Editor got it wrong

Script: Magic™ Editor
Issue type: Bug
Link to example post: See individual comments

Within the code, it's acknowledged that the magic that corrects the use of the indefinite articles "a" and "an" gets it wrong sometimes.

// Hack alert: Due to the technical nature of SO subjects, many common terms
// are not well-represented in the data used by AvsAnSimple, so we need to
// provide a way to override it.

If you come across an instance where the script got it wrong, please report it here, as a comment on the issue. Include the article chosen by the script and the word following the article, e.g. "an mistake". To do so, add a new comment to the thread.

NOTE: Because code is ignored by Magic™ Editor, indefinite articles appearing immediately before a back-ticked code snippet have no relevant context for evaluation, and are therefore always "a". Example:

You need to use an `IplWidget` object.

will become:

You need to use a `IplWidget` object.

(Migrated from old repository #114.)

Contractions not capitalized at start of sentences

Script: Magic™ Editor
Issue type: Bug
Link to example post: http://stackoverflow.com/a/35704536/1677912 in original form

The "D" in "don't" is not correctly capitalized in this text:

i stumbled upon this post, looking to use css transform in jquery for an infinite loop animation. this one worked fine for me. dont know how professional it is though.

Which became:

I stumbled upon this post, looking to use CSS transforms in jQuery for an infinite loop animation. This one worked fine for me. don't know how professional it is though.

This seems to be the case for other contractions as well, e.g. "can't", "won't".

UI improvements when setting a new target room

There are a couple changes I would suggest when setting a new target room.

  1. The banner at the top doesn't stick around for long enough. There's no way I can read all that text by the time it goes away.

  2. Let's change the banner text to show the name of the room rather than the url. Should be able to get the human-friendly name from the /rooms/info/# page.

  3. After a new target room is set, the input elements are still visible. I think it should be collapsed back into the menu item once successfully changed.

  4. Above the input box should read some text about what is currently set. Maybe something like

    The current target room for (site name) posts is (name of chat room).

Add a question mark at the end of the title when it's "asking"

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: below

For example, a title like this:

How can I fix the issue

should become:

How can I fix the issue?

Anyway, just check if the title starts with "How", "When", "Why", "What", "Can", etc. Then put a question mark after it.

Use html5 storage for room on a per-site basis

I can imagine durron wants this feature.

We should use html5 data storage for saving the chat room to post cv-plz messages to, saved per site you are on.

For example, if you are on Stack Overflow, it posts to room A, MSO posts to A as well, and MSE posts to room B.

If possible, use a dialog window similar to the flagging/closing interface of the site (same how the auto-comments work).

SOCVRG Use custom dialogs instead of alerts

Alerts are bad, Mkay? A stupid user (hi) might just click "Prevent this page from creating additional dialogs”, thereby rendering the tool useless.

It is possible to check whether alerts are showing, to help stupid users (stop talking about me!) fix things.

<pre> The other code block

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: below

Identified by Rizier on this post, in its original form.

There is code surrounded by <pre> </pre> preformat HTML tags, which is not identified by MagicEdit as code.

Same for <code> </code>.

(Migrated from old repository #94.)

Keystroke doesn't work if I take my fingers off Ctrl + Shift too quickly

Typically when I press the keystroke, I do the following:

  1. Press Ctrl with my pinky
  2. Press Shift with my ring finger
  3. Press a with my middle finger
  4. Lift my pinky
  5. Lift my ring
  6. Lift my middle finger

If I do this too quickly, the cv-pls dialog does not appear. However, if instead I:

  1. Lift my middle finger

It seems to work. This bug can be reproduced always on Chrome 44.0.2403.155 m, with script version 1.4.6.

Tags in braces not removed from title

Script: Magic™ Editor
Issue type: Bug
Link to example post: How to setup login method to avoid duplicate code every test [selenium][java]

The title of this post is: How to setup login method to avoid duplicate code every test [selenium][java]

MagicEditor does not remove the two tags from this title. Tried a new regexp for the taglist rule, but it doesn't completely remove the tags + braces. (Leaves How to setup login method to avoid duplicate code every test [.

Should add comment if tags edited

Script: Magic™ Editor
Issue type: Feature Request
Link to example post: n/a

It would be nice if the script recognized changes in the tags, and inserted a comment for them if one wasn't already present. ("Edited tags; ")

(Migrated from previous repository #75).

Indent / Outdent code

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: below

For proper layout in lists, it's necessary to indent code cod by multiples of 4 spaces.

Example post: The original version of this question.


  1. Code Service Provider:

    class EloquentEventServiceProvider extends ServiceProvider
    {
    public function boot()
    {}

    public function register()
    {
        $this->app->bind('app\\Repositories\\EventRepository', 'app\\Repositories\\Eloquent\\EventEloquentRepository');
    }
    

    }


The code here has been indented 4 spaces by use of the "code" button in the default editor, however it needs to be indented 8 characters because it's within a numbered list.

It would be nice if Magic™ Editor let us select the code block and click a button to shift it right 4 more spaces.

(Migrated from old repository #92.)

Unclosed Request Review Script dies on reports from deleted users

The request at https://chat.stackoverflow.com/transcript/message/37904956#37904956 is from user8234819, with no link. checkDone() looks for the reporting-user's <a> tag and blindly tests its href attribute. Since there is no link here, we fail with

Uncaught TypeError: Cannot read property 'href' of null
at Object.funcs.checkDone (eval at E_c (:3:221), :82:83)
at XMLHttpRequest.xhr.addEventListener.event (eval at E_c (:3:221), :218:27)

Replace window.prompt and alter with something that doesn't block the browser input

I use Chrome. I leave the chat room on one monitor and the post I'm working on the other.

Let's say I want to change the room I'm posting to.

  1. Go to the post.
  2. Hit cv-pls menu and choose "Set target room"
  3. Go to the chat room and copy the url

Oh wait, I can't. window.prompt blocks user input to the entire browser until it's finished. Same with alert.

It's frustrating :(

Here's an example dialog box I whipped up real fast.

var postMenu = $('#question .postcell .post-menu');

var popupBox = $('<div class="popup" style="position: absolute; top: 399.5px; left: calc(50% - 416px); display: block;"></div>');
popupBox.append('<div class="popup-close"><a title="close this popup (or hit Esc)">×</a></div>');
popupBox.append('<h2>This is the popup window title!</h2>');

//add more things here

postMenu.append(popupBox);

If we can get this working, we can make the "request sent successfully" auto-disappear, so you don't have to spend a mouse click to make it go away.

Tag place holder appears in diff

Script: Magic™ Editor
Issue type: Bug
Link to example post: below

I encountered a question in the Suggested Edit queue, and chose to Improve Edit. After clicking the auto-edit button, the diff included one of our _xTagxPlacexHolderx_ strings in the deleted text, where a <br> had been in the original text. Just confusing.

Link to edit: http://stackoverflow.com/review/suggested-edits/10359835

Link to revision being edited: http://stackoverflow.com/revisions/33958915/2

review suggested edits - stack overflow 2015-11-27 09-38-06

(Migrated from old repository #77.)

Oxford's common misspellings

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: n/a

http://www.oxforddictionaries.com/words/common-misspellings

I looked at just two of these, "across" and "immediately", and implemented rules that matched >8000 posts.

        across: { 
            expr: /\b(a)c+ros+\b/gi,
            replacement: "$1cross",
            reason: App.consts.reasons.spelling
        },
        immediate: {
            expr: /\b(i)m+ed[ia]+te?l?(ly)?\b/gi,
            replacement: "$1mmediate$2",
            reason: App.consts.reasons.spelling
        },

It would be a useful exercise to work through the rest of that list.

(Migrated from old repository #113.)

If text goes off-screen on any input box you are unable to manually select it

So this was a bit strange:

It seems that if the text from an input box goes off the side of the box, and you try to click and select text (like if you wanted to go to the end of the string to see what room is set), it will freak out and start inserting javascript:void(0) in the text.

I can still use the arrow keys, end key, and select + a, but I would still like to be able to select text on my own.

Tab handling does not work in Suggested Edits Reviews queue

Script: Magic™ Editor
Issue type: Bug
Link to example post: Any post in suggested edits

When improving edits in the Suggested Edits Reviews queue, the Tab key changes fields. This is expected to indent code. Likewise with shift-tab, which should outdent; that does not work in the queue.

TBD: Is this limited to the Suggested Edits, or does it happen in other queues?

Hit boxes for menu items need to be taller

It's sometimes really hard to click a menu item. The hitboxes are just too small compared to their container.

image

The real killer is that the entire clickable region changes the cursor to a pointer, so the only indication that you are on the right part is the link changes color.

"Does anyone know..."

Script: Magic™ Editor
Issue type: Auto-fix term request
Link to example post: https://regex101.com/r/pN9fY6/3

There are more than 43,000 posts containing a variant of this phrase, "Does anyone know how...". That is a colloquial term for "how", but it is literally a different question, so it is not clear. (Do people really want to know if someone knows something,? No, they are asking "how?")

As shown in the linked RegEx101, it's not a straight-forward replacement, except in a subset of cases. It would probably require a two-stage replacement, ala firstcaps.

Fix formatting of numbered lists

Script: Magic™ Editor
Issue type: Enhancement
Link to example post: http://stackoverflow.com/revisions/22688660/1

Markdown expects numbered lists to use the format n. to start list items.

Many users instead use n), which is not recognized. Other users neglect to leave a blank line (double space) before the first list item (even if it's formatted correctly otherwise), which also negates formatting.

This:

Blah blah blah
1) blah blah blah
2) blah blah blah

...should become this:

Blah blah blah

1. blah blah blah
2. blah blah blah

A blank line between items is optional.

Constant nags about cross-origin resources from Tampermonkey

I'm constantly nagged about cross-origin resource requests with the SOCVR Request Generator script, whenever I do anything on the page besides from loading it, for example:

  • Refreshing;
  • Voting;
  • Flagging;
  • Commenting

Please could this be fixed?
I've now set all requests to 'ignore', but now I'm experiencing an Failed retrieving fkey from chat notification message where the 'Sent cv-pls request' message should be.

image

'URL invalid'

image

Happens when I'm attempting to send a 'cv-pls' to SO CV Reviewers Chat.
On Chrome 44.0.2403.157 m on Windows 8.1 Professional.

Add question tag(s) to cv-pls request

The question tag (most relevant or all) should be added as es. [java] not [tag:java] to the cv-pls request, before or after the title.

Reasons:

  1. On duplicate request, hammer in SOCVR chat can immediately identify if he can hammer.
  2. User in chat and when searching on previous requests can filter on specific tag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.