Userscripts
- Last edited on Mar 28, 2020, 9:23:44 PM by Andras Deak -- Слава Україні
- SO chat snippets – adds pre-prepared chat messages to the input box
share_markdown.user.js
– Adds markdown link with question title to “share” button on SO posts.soChatSpoilerAdd.user.js
– Adds a “spoiler” button to chat, which obscures selected textsoChatSpoilerAdd.user.js
– Variant of the abovesoChatSpoilerAdd.user.js
script. This one creates secret alt text in a dummy link rather than linking tosopython.com/spoiler
.network_bar_filter.user.js
– Filters links out of Stack Overflow’s “Hot Network Questions” sidebar, based on originating SE site. Useful for avoiding spoilers from Scifi/Fantasy.avatar_blocker.user.js
– anonymizes the avatars of ten-or-less rep userschar_count_adder.user.js
– tells you how many characters your message is, and whether it will fit on the starred list without being truncated.- That one that puts a “timeline” link on posts
chat-unstar-transcript.user.js
– click stars in the transcript to unstarusernotes.user.js
– adds persistent modifiable “user notes” section to each user’s popup box.Username_lookup.user.js
– adds a button to the chat’s search page that lets you choose which username to search by, while showing which avatar belongs to which candidate.SOchat_mcve_shortcut.user.js
– makes the [mcve] shortcut from the main site also work in chat.SE_hide_new_users_questions.user.js
– hides questions from 1 rep users- Duplicate Target Manager – manages a local, searchable pool of duplicate targets
Installing Userscripts
Before installing a userscript, you may need to install a userscript manager extension:
- Chrome - TamperMonkey
- Firefox - Greasemonkey
- IE - TrixIE WPF4.5*, IE7Pro*, iMacros*
- Opera - no extension required.
- Safari - GreaseKit*, NinjaKit*
(Managers marked with a “*” are not guaranteed to be reputable, functional, up-to-date, or extant. Use your best judgment before downloading.)
Once the extension is installed, navigating to the .user.js
file in your browser should prompt you to install it. If the file is hosted on Github or Gist, click the “Raw” button.
Installing Userscripts As Bookmarklets
If you can’t or dont want to use a userscript manager, many userscripts can be saved as a bookmarklet. Bookmarklets are supported by every browser that supports javascript.
Check the userscript’s page to see if it provides a bookmarklet version. For example, https://gist.github.com/kms70847/29ea39da5dc80b38eb2a353149185193 provides a SoChatSpoilerAdd.bookmarklet
file.
Create a new bookmark in your browser, pointing to any page. Open the bookmark’s Properties window. Erase the existing URL and paste in the contents of the bookmarklet file.
If the userscript page does not provide a bookmarklet version, it may be possible to create one yourself. Edit the .user.js
file so the script appears entirely on one line. You may need to add semicolons between consecutive statements, and braces around one-line conditionals. Once the script is on one line, add javascript:(function(){
to the front, and })();
to the end. Then create the bookmarklet, as described above.
Once the bookmarklet is created, you can use its functionality by clicking on the bookmarklet in your bookmarks menu. (Make sure the current tab is the page you want to run the userscript on)