Skip to content

Various userscripts I've written for my own usage. Now available to the public!

Notifications You must be signed in to change notification settings

StaticPH/Userscripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StaticPH's Userscripts

HitCount
Unless otherwise specified in their description, all userscripts have been tested with ViolentMonkey on Chromium 72 or later and on Vivaldi 3.6 or later. They may also work with GreaseMonkey, TamperMonkey, or on other browsers.

Get ViolentMonkey for your browser

Other

Important note:

I tend to open a lot of things in new tabs, which happens to result in matching scripts always being injected. As such, many of my userscripts are written to only inject after loading the specific page(s) for which they are written. That means some methods of page navigation (e.g. AJAX) may result in scripts not being injected and executed on pages they should be. If your browsing habit doesn't involve much opening things in new tabs, you'll likely want to modify/override the exclude-match list for some of my scripts. Alternatively, you could simply refresh relevant pages after the initial navigation, to cause your userscript manager to re-check which scripts should be injected. One example of such a scenario could be opening a Twitch.tv livestream from the directory view.


To add a script:

  • Install a script directly from GitHub by clicking on the "install" link in the table below.
Userscript
Description
Direct
Install
Sites Supports
Auto-Update
License Created Updated
Hide YouTube Overlay Ads install N/A ✔️ MIT 2020:04:04 2020:10:27
Fix YouTube Player Bottom Gradient install N/A ✔️ MIT 2021:02:26 2021:03:30
YouTube Channel Keyboard Protection install N/A ✔️ MIT 2021:11:13 2022:05:01
Twitch Hide Channel Leaderboard install N/A ✔️ MIT 2020:06:19 2022:08:19
Twitch Transparent Video Stats install N/A ✔️ MIT 2021:05:19 2022:08:19
Twitch Hide Content Disclosure install N/A ✔️ MIT 2023:06:29 2023:06:29
GitHub Repo Network Tab install N/A ✔️ MIT 2020:04:06 2024:02:01
Bigger GitHub Network Graph install N/A ✔️ MIT 2020:04:12 2021:10:28
GitHub Notification Page Tweaks install N/A ✔️ MIT 2020:10:22 2021:08:03
GitHub Sticky Editor Header install N/A ✔️ MIT 2021:11:24 2021:11:24
GitLab Description In Title install N/A ✔️ MIT 2021:05:22 2021:08:03
Prettier Lib.rs Preformatted Code install N/A ✔️ MIT 2020:07:05 2021:03:30
Lib.rs Description In Title install N/A ✔️ MIT 2021:04:28 2021:05:11
Crates.io Description In Title install N/A ✔️ MIT 2021:03:16 2022:11:10
Centered Gmail Toast Notifications install N/A ✔️ MIT 2020:06:19 2021:04:05
Google Meet Ignore Hardware Disabled install N/A ✔️ MIT 2023:03:03 2023:03:03
Wider Google Form Fields install N/A ✔️ MIT 2021:09:30 2022:08:19
Correct Google Form Correctness install N/A ✔️ MIT 2021:11:09 2021:11:09
Google Search Lean Query Updates install N/A ✔️ MIT 2023:07:12 2024:01:14
Roll20 Nonscrolling Number Fields install N/A ✔️ MIT 2021:01:23 2021:04:05
Bypass Blogspots Blogger IFrame install N/A ✔️ MIT 2021:06:02 2022:05:01
Foxaholic Fixes install N/A ✔️ MIT 2021:06:02 2021:08:27
Mitigate Target _blank Risk install N/A ✔️ MIT 2021:08:27 2021:11:23
MSYS2 Package Description In Title install N/A ✔️ MIT 2021:04:28 2021:05:11
Minecraft CurseForge Title Tweaks install N/A ✔️ MIT 2022:04:20 2022:06:18
Another Open In Steam Button install N/A ✔️ MIT 2022:11:25 2022:11:25
Ubuntu Packages Description In Title install N/A ✔️ MIT 2023:05:11 2023:05:11
Quietly Reject StackExchange Cookies install N/A ✔️ MIT 2023:05:14 2023:05:14
PyPI Description In Title install N/A ✔️ MIT 2023:05:31 2023:05:31
Simple URL Tracker Cleaner install N/A ✔️ MIT 2021:08:10 2024:01:28
Old Reddit Hide Posts By Sub install N/A ✔️ MIT 2022:04:08 2023:07:02
ScribbleHub Reading List Upgrades install N/A ✔️ MIT 2022:10:07 2024:01:19
NovelUpdates Reading List Upgrades install N/A ✔️ MIT 2022:07:08 2022:11:16

Hide YouTube Overlay Ads

This script should no longer be needed after Google's removal of overlay ads on April 6th, 2023.

You know those little overlay advertisements that pop up on the bottom center of YouTube videos? If those really annoy you, this simple userscript (really just a userstyle wrapped into a userscript) will help by simply preventing them from rendering.
Note that this does not affect other ads.

[Install]


Fix YouTube Player Bottom Gradient

This "fixes" the excessively large bottom gradient area that sometimes appears on the YouTube video player when the mouse cursor is within the player frame.
So far, I've only seen the phenomenon that led me to write this while using Vivaldi.

[Install]


YouTube Channel Keyboard Protection

Prevents YouTube from hijacking the Up/Down arrow keys on channel pages, as it likes to do sometimes (Left and Right arrow keys are okay though, because those don't control page scrolling).

[Install]


Twitch Hide Channel Leaderboard

Hides the stupid channel leaderboard on Twitch.tv stream chat.
Extensions like FrankerFaceZ may already have this functionality.

[Install]


Twitch Transparent Video Stats

Makes the video stats overlay on Twitch.tv video player partially transparent, so as to avoid obscuring the stream so much.

[Install]


Twitch Hide Content Disclosure

Hides the stupid content disclosure overlay from the Twitch.tv video player.
Extensions like FrankerFaceZ may already have this functionality.

[Install]


GitHub Repo Network Tab

Adds a navigation tab for faster access to the 'Network' page of a repository.

Known bugs:

  • Occasionally the tab fails to be added, with no clear explanation or pattern. If this occurs, simply reload the page.
  • When switching between repository tabs, the network tab sometimes disappears, and something about the way GitHub does page navigation within a repository doesn't cause this script to be re-injected. Short of constantly checking state on a sub-second timer, or using a mutation observer, I don't know how else to solve this.

[Install]


Bigger GitHub Network Graph

Makes the timeline on the Network page of GitHub repositories utilize more of that available whitespace on the sides.
Still can't seem to make it use all the space on the right side though...

Essentially a subset of Wide GitHub which, of course, I only realized after I'd written this. Oh well, someone will probably find this useful.

[Install]


GitHub Notification Page Tweaks

Why does GitHub's beta notifications inbox use a "More" dropdown when there's more than enough space for the 2 elements within? I don't know, and I dislike having to open a dropdown just to mark something as "read", so I did something about it.

[Install]


GitHub Sticky Editor Header

Makes the header of the (text) file editor on GitHub sticky.
Written because I got sick and tired of having to move up and down the page to change to and from the preview while editing this README.

[Install]


GitLab Description In Title

Attempts to improve the page titles on GitLab by including the contents of the page's description, if one is provided.
This also replaces instances of Unicode character 0x00B7, "Middle Dot", in the title, as I've found that particular character has strangely led some editors to erroneously read and write the text in undesired encodings, such as GB2312, instead of UTF-8.

[Install]


Prettier Lib.rs Preformatted Code

Makes <pre><code> blocks on lib.rs look more like they do on crates.io; lib.rs is so much faster thanks to reduced JS use, but it's not as pretty.

[Install]


Lib.rs Description In Title

Replace the unhelpful part of the tab title on a lib.rs crate's page with the short description of the crate, if one is provided.
Convenient for bookmarking and tab-saving extensions, as pages are typically stored according to their titles.

[Install]


Crates.io Description In Title

Replace the unhelpful part of the tab title on a crate.io crate's page with the short description of the crate, if one is provided.
Convenient for bookmarking and tab-saving extensions, as pages are typically stored according to their titles.

[Install]


Centered Gmail Toast Notifications

Do you hate that Gmail shows a toast notification that blocks functional regions of the UI after you do something to any email? Me too!
This little change should help mitigate the problem by moving the toast notification to the bottom center of the screen.

[Install]


Google Meet Ignore Hardware Disabled

A.K.A "I know my hardware is disabled, Google"
Thanks Google, but I'm well aware that my browser hasn't given you permission to access my hardware; I don't need you showing a prompt that can't be closed with a keypress.

[Install]


Wider Google Form Fields

Widens the input fields in google forms from 50% to 100% of the question element (minus padding).

[Install]


Correct Google Form Correctness

Make fields that have been manually marked as correct take on the same styling as fields that exactly matched the preset correct answer.

[Install]


Google Search Lean Query Updates

Proof-of-concept: Prevent modifications to the Google search query in the on-page search bar from inserting a bunch of unwanted parameters into the resulting URL.

[Install]


Roll20 Nonscrolling Number Fields

This should disable changing the value of any numeric fields on Roll20 character sheets by scrolling.
TODO: Replace the use of setTimeout with a MutationObserver.

[Install]


Bypass Blogspot's Blogger IFrame

Unhide the page body and hide obstructive injected iframes on some Blogspot pages, which use those methods for reasons like discouraging ad blocking.

[Install]


Foxaholic Fixes

Fix Foxaholic's deliberate breaking of context menus, keypresses, and text selection.

[Install]


Mitigate Target _blank Risk

Appends rel="noopener noreferrer" to every link (HTMLAnchorElement, not to be confused with HTMLLinkElement) that has target="_blank", preventing a possible security risk.
This will break links to some sites, likely any links that would otherwise have opened in a new tab by default.
Users may choose to ignore links from additional url origins, by setting the customAllowedOrigins key in the script's value storage to a list of origins, delimited by a single space character, ' '.
e.g. Setting customAllowedOrigins to 'http://wordpress.com https://stackexchange.com https://novelupdates.com' will prevent this script from modifying links to those origins.

[Install]


MSYS2 Package Description In Title

Include the package description on the tab title for a package's page on packages.msys2.org/packages

[Install]


Minecraft CurseForge Title Tweaks

Modifies the format of the page title for some of CurseForge's Minecraft pages.

[Install]


Another "Open In Steam" Button

As the name should imply, this is my own version of a script which adds a new button on Steam's steampowered and steamcommunity sites to open the current page in the Steam app. Some of the CSS used was borrowed from https://greasyfork.org/en/scripts/454372-open-steam-url after I spent well over an hour fiddling with my own CSS in the pre-dawn hours, and decided I wasn't going to manage much better.

[Install]


Ubuntu Packages Description In Title

Try to provide a minimal, yet meaningful, page title that includes the package description on Ubuntu's package search/archive website.

[Install]


Quietly Reject StackExchange Cookies

Hide the pesky cookie permission requests on StackExchange sites, which don't actually appear to set even "necessary" cookies until the user responds to the permission prompt.
Also hides a few other little things that just don't warrant another tiny script.

[Install]


PyPI Description In Title

Rewrite the page title for a PyPI package to include a brief summary, when available.

Also doesn't use that centered dot character as a separator.

[Install]


Simple URL Tracker Cleaner

Scrub various common tracker parameters from URLs. Even if you don't mind being tracked, parameters like these often make URLs rather long; why copy, share, or save a 200 character URL when you could get the exact same content by removing 160 of those characters, without routing traffic through some URL shortening service?

Primarily targets parameters related to Google, Amazon, and Facebook.

Icon from: Fly Swatter free icon created by Freepik - Flaticon

[Install]


Old Reddit Hide Posts By Sub

Hide posts from arbitrary subreddits (unless specifically looking at them, of course).

Only works for old.reddit.com, not www.reddit.com, because not only does the latter use a DOM structure that makes it unsuitable for applying styles to entire post-elements by the CSS selector of the child element holding the subreddit, it also commits the desktop (and frankly, even mobile) user-experience war-crime of infinite pagination (endless scrolling). TLDR: Modern Reddit UI sucks, and supporting it would take more effort than I'm willing to put in to this for my own use.

[Install]


ScribbleHub Reading List Upgrades

Allows hiding novels the user is caught up on from their reading lists, adds the current reading list name to the title, and more planned.

[Install]


NovelUpdates Reading List Upgrades

Allows hiding novels the user is caught up on from their reading lists, adds the current reading list name to the page title, and more planned.

[Install]


Legacy Workaround Scripts

These scripts are just simple and clumsy workarounds for behavior that no longer functions correctly in my years-old portable Chromium. If you've updated your browser to the current release at any point in the last few years, you almost certainly don't want these.


GitHub Line Hyperlink Workaround

Add simple onclick handlers to the line numbers when viewing files on GitHub, as the normal behavior of linking directly to a clicked line number seems to have broken on legacy browsers as a result of some change to the implementation.

[Install]


GitHub Notifications Archive Workaround

Quick and simple redirect to work around strange behavior of being sent to github.com/notifications/beta/archive when marking notifications as done.

[Install]


GitHub Collapsed Details Workaround

Add simple onclick handlers to the collapsed details of commits on GitHub, as the normal behavior of expanding the ellipses to the full commit message when clicked seems to have broken on legacy browsers as a result of some change to the implementation.

[Install]


GitHub Lazy Release Asset Workaround

Multiple fixes related to user-downloadable asset files on GitHub for users of legacy browsers. - Fetch asset list for releases, as the code that should already have been responsible for that is too modern, and is thus never even attempted on legacy browsers. - Fix the timestamps on the release page(s), most of which are within asset lists. - Slightly changes normal behavior by automatically showing all assets for the first release on the page, whether that's two assets or fourty assets.

[Install]


StackExchange Legacy Comments Expander

Replace 'Show X more comments' handler for StackExchange sites to better support older browsers; in particular, this enables showing all comments when using Chromium 72.

[Install]


Issues

Please report any issues within this repository's issue section

Additionally, I do occasionally take requests for simple scripts, so feel free to ask. Please bear in mind that JavaScript is not a language I consider pleasant to use, nor do I consider myself particularly competent with it. I reserve the right to refuse any request with or without comment.


Some of the awesome scripts I use from other authors

About

Various userscripts I've written for my own usage. Now available to the public!

Topics

Resources

Stars

Watchers

Forks