Skip to content

Instantly share code, notes, and snippets.

@vsubhash
vsubhash / policies.json
Last active July 14, 2022 05:13
V. Subhash's Firefox Annoyances Reduction Template (policies.json)
{
"policies": {
"Cookies": {
"ExpireAtSessionEnd": true,
"Behavior": "reject-foreign",
"BehaviorPrivateBrowsing": "reject-foreign"
},
"DisableAppUpdate": true,
"DisableBuiltinPDFViewer": true,
"DisableFirefoxStudies": true,
@vsubhash
vsubhash / com.vsubhash.js.YoutubeLite.user.js
Created July 7, 2020 18:49
Loads a lite version of Youtube and adds RSS, links to video pages, and downloads for video and subtitles. (Youtube stopped support for old versions of Firefox.) This script supersedes that of Youtube Annoyance Remover.
// ==UserScript==
// @name YoutubeLite
// @namespace com.vsubhash.js.YoutubeLite
// @description Loads a lite version of Youtube, adds video file downloads and subtitle links
// @include https://www.youtube.com/watch*
// @version 2020.07.07
// @grant none
// ==/UserScript==
@vsubhash
vsubhash / com.vsubhash.bash.create_thumbnail_gallery_for_video.txt
Last active April 8, 2021 14:10
This BASH script uses FFMPEG to create thumbnails from a video. The thumbnails are then stitched together as a gallery using ImageMagick.
@vsubhash
vsubhash / com.vsubhash.js.embedded-video-catcher.user.js
Last active June 6, 2019 15:57
EmbeddedVideoCatcher - Adds a link to the video file. Supports Firefox-based browser up to version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to be executed by the Firefox browser. If the video link is inac…
// ==UserScript==
// @name EmbeddedVideoCatcher
// @namespace com.vsubhash.js.embedded-video-catcher
// @description Adds a link to the video file. Supports Firefox-based browser up to version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to be executed by the Firefox browser. If the video link is inaccessible by a transparent image or other HTML element, the URL can be obtained from the browser's web console output (Tools -> Web Developers -> Console). The script also automatically pauses the video several times.
// @include http://*
// @include https://*
// @exclude https://www.youtube.com/watch*
// @exclude https://www.dailymotion.com/video*
// @version 2019.06
// @grant none
@vsubhash
vsubhash / youtube-like-in-old-times-search.xml
Last active April 14, 2019 05:00
To search videos on popularity (instead of useless mainstream media shows), drop this file in the searchplugins directory of the firefox data directory to create a new YouTube search engine in the search box.
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Youtube</ShortName>
<Description>Youtube Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAD/EAAA/0AAAP9AAAD/cAAA/4AAAP+AAAD/gAAA/4AAAP+AAAD/QAAA/0AAAP8Q////AP///wD///8AAAD/YAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/2D///8AAAD/MAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/MAAA/1AAAP//AAD//wAA//8AAP//AAD//wAA//8QEP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/2AAAP+AAAD//wAA//8AAP//AAD//wAA//8AAP//4OD//1BQ//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP+AAAD/gAAA//8AAP//AAD//wAA//8AAP//AAD/////////////wMD//yAg//8AAP//AAD//wAA//8AAP//AAD/gAAA/4AAAP//AAD//wAA//8AAP//AAD
@vsubhash
vsubhash / com.vsubhash.js.youtube-annoyances-remover.user.js
Last active January 24, 2020 04:36
YouTubeAnnoyancesRemover - Disables ads, turns off autoload/autoplay, adds RSS link, deletes "recommended for you" videos, unhides description, displays all comments, changes profile link to videos page; changes region to US, displays video thumbnail image, and adds a link to the lighter version on Hooktube if video is not playable for codec rea…
// ==UserScript==
// @name YouTubeAnnoyancesRemover
// @namespace com.vsubhash.js.youtube-annoyances-remover
// @description Disables ads, turns off autoload/autoplay, adds RSS link, deletes "recommended for you" videos, unhides description, displays all comments, changes profile link to videos page; changes region to US, displays video thumbnail image, and adds a link to the lighter version on Hooktube if video is not playable for codec reasons. Supports Firefox-based browser up to version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to be executed by the Firefox browser. For embedded YouTube videos, use the script com.vsubhash.js.embedded-video-catcher.user.js.
// @include https://www.youtube.com/watch*
// @include https://www.youtube.com/channel*
// @include https://www.youtube.com/user*
// @version 2020.01
// @grant none
// ==/UserScript=
@vsubhash
vsubhash / com.vsubhash.js.autoplay-video-auto-stopper.user.js
Last active June 4, 2019 06:36
AutoPlayVideoAutoStopper - Pauses auto-playing videos. Excludes YouTube (has its own autostopper script com.vsubhash.js.youtube-annoyances-remover); Supports Firefox-based browser up to Version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will r…
// ==UserScript==
// @name AutoPlayVideoAutoStopper
// @namespace com.vsubhash.js.autoplay-video-auto-stopper
// @description Pauses auto-playing videos. Excludes YouTube (has its own autostopper script com.vsubhash.js.youtube-annoyances-remover); Supports Firefox-based browser up to Version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to run the script inside a browser.
// @exclude https://www.youtube.com/*
// @version 2019.02
// @grant none
// ==/UserScript==
document.addEventListener("readystatechange", handle_DOMLoad, false);
@vsubhash
vsubhash / com.vsubhash.js.BookReaderView.js
Created February 3, 2019 01:40
"eBook Reader" mode for desktop Internet browsers using Greasemonkey JavaScript
// ==UserScript==
// @name BookReaderView
// @namespace com.vsubhash.js.BookReaderView
// @version 1
// @grant none
// ==/UserScript==
if (subhash_browser_js == null) {
var subhash_browser_js = {};
}
@vsubhash
vsubhash / com.vsubhash.js.youtube-profile-link-to-videos-changer.js
Last active December 19, 2018 00:41
Changes the profile link to the videos page
@vsubhash
vsubhash / com.vsubhash.bash.twitter-to-pdf.txt
Created September 14, 2018 02:05
com.vsubhash.bash.twitter-to-pdf.txt is a Unix/Linux shell script for saving all messages posted by a Twitter account as an archive in PDF format.
if [ $# -lt 2 ]; then
echo -e "The format is:\n\t\e[35m`basename $0` \e[35;1mtwitter-handle-or-hashtag number-of-tweets [nojs]\e[0m"
exit
fi
# A backup of all files will be available in this Logs directory
if [ ! -d ~/Logs ]; then
mkdir ~/Logs
fi
cd ~/Logs