{"id":13447857,"url":"https://github.com/SO-Close-Vote-Reviewers/UserScripts","last_synced_at":"2025-03-22T01:31:27.282Z","repository":{"id":22925988,"uuid":"26275009","full_name":"SO-Close-Vote-Reviewers/UserScripts","owner":"SO-Close-Vote-Reviewers","description":"Various user scripts that add features to the review queue or to the chat room","archived":false,"fork":false,"pushed_at":"2024-12-03T15:00:26.000Z","size":2088,"stargazers_count":57,"open_issues_count":42,"forks_count":40,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-12-03T16:18:53.240Z","etag":null,"topics":["hacktoberfest","magic"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SO-Close-Vote-Reviewers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-06T15:03:36.000Z","updated_at":"2024-12-03T15:05:37.000Z","dependencies_parsed_at":"2024-07-05T16:26:19.323Z","dependency_job_id":"93acc0fa-4d93-4387-8160-ae9f8004eba1","html_url":"https://github.com/SO-Close-Vote-Reviewers/UserScripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SO-Close-Vote-Reviewers%2FUserScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SO-Close-Vote-Reviewers%2FUserScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SO-Close-Vote-Reviewers%2FUserScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SO-Close-Vote-Reviewers%2FUserScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SO-Close-Vote-Reviewers","download_url":"https://codeload.github.com/SO-Close-Vote-Reviewers/UserScripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893456,"owners_count":20527597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","magic"],"created_at":"2024-07-31T05:01:28.750Z","updated_at":"2025-03-22T01:31:26.956Z","avatar_url":"https://github.com/SO-Close-Vote-Reviewers.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# User Scripts\n\nThis repository contains various [Tampermonkey](http://tampermonkey.net/) (Chrome, Opera Next, Safari, Firefox) / [Greasemonkey](http://www.greasespot.net/) (Firefox) user scripts that add features to Stack Exchange web interfaces, such as the review queues, the chat room, and the Markdown editor.\n\nJump to:\n- [SO Close Vote Request Generator](#so-close-vote-request-generator)\n  - [SO Close Vote Request Generator (bookmarklet)](#so-close-vote-request-generator-bookmarklet)\n- [Magic™ Editor](#magic-editor)\n\n## SO Close Vote Request Generator\nThis 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.\n\n### Use Case\nClose Vote requests should be used when a question meets any of the following criteria:\n\n* Is in a low traffic tag, so unlikely to be closed naturally\n* Should be closed quickly, to avoid FGITW\n* Is old but attracting attention from new users\n\nOtherwise, 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.\n\nSending 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.\n\n**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.\n\n### Installation\nTo install this script [click here](https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/SECloseVoteRequestGenerator.user.js) or otherwise visit the following URL, and Greasemonkey/Tampermonkey should ask you to install it.\n\n     https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/SECloseVoteRequestGenerator.user.js\n     \n### Updating\nThis 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.\n\nTo update manually you can visit the above URL again, or select \u003ckbd\u003eCheck for updates\u003c/kbd\u003e from the \u003ckbd\u003ecv-pls\u003c/kbd\u003e menu.\n\n### Issues \u0026 enhancement requests\nBefore raising new issues, please review the [currently known issue list](https://github.com/SO-Close-Vote-Reviewers/UserScripts/issues?q=is%3Aissue+is%3Aopen+label%3A\"script%3A%20Close%20Vote%20Request%20Generator\").\n\n\u003c!-- I used http://meyerweb.com/eric/tools/dencoder/ to encode the issue report template --\u003e\nTo report a new issue or request an enhancement, create a GitHub Issue Report using [this template](https://github.com/SO-Close-Vote-Reviewers/UserScripts/issues/new?labels=\"script%3A%20Close%20Vote%20Request%20Generator\"\u0026body=**Script%3A**%20Close%20Vote%20Request%20Generator%0A**Issue%20type%3A**%20Bug%20%2F%20Enhancement%20%2F%20Question%20(pick%20one)%0A**Link%20to%20example%20post%3A**%20(where%20can%20the%20problem%20be%20reliably%20replicated%3F)%0A%0AProblem%20description...) (requires a GitHub account).\n\nAs an alternative, you may send a Pull request for your own fixes or enhancements.\n\n### Target Chat Room\nThe default chat room is [SO Close Vote Reviewers](http://chat.stackoverflow.com/rooms/41570/so-close-vote-reviewers).\n\nThe 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. \n\nWhen 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.\n\nCopy the chatroom URL from your address bar and paste it into the input field below the room list. Clicking \u003ckbd\u003eSet\u003c/kbd\u003e 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.\n\n### Sending Requests\nRequests 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. \n\n    [tag:cv-pls] reason [title](url) - [user](url) time\n\n1. Select \u003ckbd\u003eSend request\u003c/kbd\u003e from the \u003ckbd\u003ecv-pls\u003c/kbd\u003e menu.\n  *  Or press \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003eA\u003c/kbd\u003e\n2. Enter your reason into the input provided.\n  *  Any markdown that is acceptable in chat is acceptable in the reason dialog.\n3. Click \u003ckbd\u003eSend\u003c/kbd\u003e or press \u003ckbd\u003eEnter\u003c/kbd\u003e to submit the request. \n\nA notification will pop-up if the request was sent successfully.\n\n### Short Reasons\nThis 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.\n\n* `t: too broad` \n* `u: unclear`\n* `p: pob`\n* `d: duplicate`\n* `m: no mcve`\n* `r: no repro`\n* `s: superuser`\n* `f: serverfault`\n* `l: library/tool/resource`\n\n### SO Close Vote Request Generator (bookmarklet)\nIn 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](https://www.google.com/search?q=bookmarklet).\n\n#### Using the bookmarklet:\nYou 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.\n\n#### Creating the bookmarklet:\nIn 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](SECloseVoteRequestGenerator-bookmarklet.min.js) of the bookmarklet is:\n\n    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)\u0026\u0026'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\u0026\u0026(d='['+d+']('+u+v.attr('href')+')');var y=$('.relativetime',m);y.length\u0026\u0026(h=y.attr('title'));var w='[tag:'+c+'] [tag:'+f+'] '+p+' '+g+' - '+d+(h?'‭ - '+h:''),x='\u003ctextarea class=\\'cvrg-result\\' style=\\'width:95%;display:block;margin:10px auto;\\'\u003e'+w+'\u003c/textarea\u003e',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\u003c100?setTimeout(e,200):t()},200)}else t()}())\n\n\n\nYou can see the [non-minified version of the bookmarklet](SECloseVoteRequestGenerator-bookmarklet.js). \n\nFor some reason, Edge does not permit directly creating bookmarklets. In Edge, you *must* import the bookmarklet from the [bookmarks file](SECloseVoteRequestGenerator-bookmarklet-bookmarks.html).  You will need to save that file to your system and then use Edge's settings-\u003eImport from another browser-\u003eImport 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.\n\nOther browsers can also import from the .html file, but don't need to.\n \n\n## Magic™ Editor\n\nThis is our own fork of the [Stack Exchange Editor Toolkit](http://stackapps.com/questions/4899/stack-exchange-editor-toolkit).\n\nThe 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™.\n\n### Installation\nTo install this script [click here](https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/Magic%E2%84%A2Editor.user.js) or otherwise visit the following URL, and Greasemonkey/Tampermonkey should ask you to install it.\n\n     https://github.com/SO-Close-Vote-Reviewers/UserScripts/raw/master/Magic%E2%84%A2Editor.user.js\n     \n### Updates\nThis 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.\n\nTo update manually you can visit the above URL again, or check for updates in Tampermonkey or Greasemonkey.\n\n### Issues \u0026 enhancement requests\nBefore raising new issues, please review the [currently known issue list](https://github.com/SO-Close-Vote-Reviewers/UserScripts/labels/script%3A%20Magic%E2%84%A2%20Editor).\n\n\u003c!-- I used http://meyerweb.com/eric/tools/dencoder/ to encode the issue report template --\u003e\nTo report a new issue or request an enhancement, create a GitHub Issue Report using [this template](https://github.com/SO-Close-Vote-Reviewers/UserScripts/issues/new?labels=script%3A%20Magic™%20Editor\u0026body=**Script%3A**%20Magic%E2%84%A2%20Editor%0A**Issue%20type%3A**%20Bug%20%2F%20Enhancement%20%2F%20Auto-fix%20term%20request%20(pick%20one)%0A**Link%20to%20example%20post%3A**%20(where%20can%20the%20problem%20be%20reliably%20replicated%3F)%0A%0AIf%20you%20are%20requesting%20support%20for%20a%20new%20auto-correction%20term%2C%20explain%20why%20the%20rule%20should%20be%20supported.%20How%20prevalent%20is%20the%20mistake%3F%20For%20example%2C%20https%3A%2F%2Fregex101.com%2Fr%2FxN8qD9%2F1%20clearly%20shows%20what%20incorrect%20terms%20are%20expected%20to%20be%20addressed%2C%20and%20anticipates%20possible%20conflicts%2C%20as%20well%20as%20reporting%20on%20the%20number%20of%20existing%20posts%20containing%20the%20errors.) (requires a GitHub account).\n\nAs an alternative, you may send a Pull request for your own fixes or enhancements.\n\n### User's guide\n\n**REMEMBER:** Magic™ Editor is an editing aid, but **you** are responsible for your edits. Don't just click-and-go; always review your edits.\n\nRather than 2,000 words, here are two pictures to explain basic use.\n\nThe Magic™ wand appears on the editor tool bar when the Magic™ Editor is available for use.\n\n![Magic™ wand](http://i.stack.imgur.com/jB5bR.png)\n\nWhen you click the Magic™ wand, the display changes to show the applied updates in a diff view.\n\n![After the Magic™](http://i.stack.imgur.com/2x6n7.png) \n\n#### Usage tips\n\n**Before invoking the Magic™**, you should:\n- Check that any code in the question is properly indented, so Magic™ Editor treats it as code, not prose.\n- Likewise with any in-line code statements, which are best enclosed in backticks (`).\n\n**Afterwards**, you should:\n- _Review_ the results in the Diff view.\n- Manually revert any automatic changes that were inappropriate for the current post. Consider these examples:\n - If [removal of tags from the title](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles) made the title too short, you will need to [replace the entire title with a good one](http://meta.stackexchange.com/questions/10647/how-do-i-write-a-good-title).\n - 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.)\n- 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.)\n\n### Supported Corrections\n\nAt this time (4 Feb 2016), Magic™ Editor has:\n\n- Rules for tidying question titles; tags are removed from the beginning and end, all caps titles are converted to Sentence case.\n- 97 Trademark spelling \u0026 capitalization rules (e.g. \"JavaScript\", \"MySQL\", and \"WordPress\").\n- 255 Spelling rules, many of which can fix multiple words.\n- 55 Acronym capitalization rules (e.g. \"HTTP\")\n- 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...\").\n- 12 Noise-reduction rules to remove fluff that adds nothing of technical value to posts.\n- Automatic correction of numbered-list item layout.\n- Editor support for shifting text (indent / outdent).\n\n### Better handling of indentation and the TAB key when editing posts\u003csup\u003e[ref](http://stackapps.com/questions/3247)\u003c/sup\u003e\n\u003csup\u003e\u003csub\u003eIncluded script (c) 2012 Benjamin Dumke-von der Ehe, under [MIT Licence](https://opensource.org/licenses/MIT)\u003c/sub\u003e\u003c/sup\u003e\n\nThis user script changes the behavior of a few keys (most notably the \u003ckbd\u003eTab\u003c/kbd\u003e key) within the post editor to behave more like it does in IDEs or text editors:\n\n* When one or more lines are selected, \u003ckbd\u003eTab\u003c/kbd\u003e and \u003ckbd\u003eShift\u003c/kbd\u003e-\u003ckbd\u003eTab\u003c/kbd\u003e indent and outdent these lines\n\n* When nothing is selected, \u003ckbd\u003eTab\u003c/kbd\u003e and \u003ckbd\u003eShift\u003c/kbd\u003e-\u003ckbd\u003eTab\u003c/kbd\u003e insert or remove whitespace to align the cursor on a tab boundary\n\n* When the cursor is within the left margin of a line, \u003ckbd\u003eBackspace\u003c/kbd\u003e removes whitespace to align the cursor on a tab boundary (in other words, it may delete more than just one space character)\n\n* On indented lines, the \u003ckbd\u003eHome\u003c/kbd\u003e 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 \u003ckbd\u003eHome\u003c/kbd\u003e 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.\n\n* So that you don't have to reach for the mouse to tab out of the editor, you can press *and release* the \u003ckbd\u003eCtrl\u003c/kbd\u003e key, and the next key press will not be intercepted; thus \u003ckbd\u003eTab\u003c/kbd\u003e takes you out of the editor. Pressing and releasing \u003ckbd\u003eCtrl\u003c/kbd\u003e 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 .\n\nNote 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSO-Close-Vote-Reviewers%2FUserScripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSO-Close-Vote-Reviewers%2FUserScripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSO-Close-Vote-Reviewers%2FUserScripts/lists"}