Skip to content

Instantly share code, notes, and snippets.

View fallaciousreasoning's full-sized avatar

Jay Harris fallaciousreasoning

  • Queenstown, New Zealand
View GitHub Profile
@fallaciousreasoning
fallaciousreasoning / gear.goggle
Last active April 2, 2024 00:39
NZ Gear Goggle
! name: NZ Gear
! description: A goggle which finds gear available in NZ
! public: true
! author: fallaciousreasoning
! homepage: https://github.com/fallaciousreasoning
$discard
! NZ made gear
$site=southernlitepacks.co.nz,boost=3
@fallaciousreasoning
fallaciousreasoning / git-continue
Created January 12, 2024 00:49
Generic script for continuing the current git operation
#!/usr/bin/env bash
repo_path=$(git rev-parse --git-dir)
if [ $? -ne 0 ]; then
exit $?
fi
if [ -d "${repo_path}/rebase-merge" ]; then
git rebase --continue
@fallaciousreasoning
fallaciousreasoning / goodreads-setreaddates.js
Created December 23, 2021 10:51
A script which adds a button to Goodreads for setting the Read date to the shevled date.
// ==UserScript==
// @name Goodreads Set ReadDate
// @namespace Violentmonkey Scripts
// @match https://www.goodreads.com/review/list/*
// @grant none
// @version 1.0
// @author -
// @description 20/12/2021, 12:05:54 pm
// ==/UserScript==
@fallaciousreasoning
fallaciousreasoning / goodreads-sort-to-read-by-date-added.js
Created November 6, 2019 07:21
By default, Goodreads sorts the to read shelf by least recently added. This reverses that.
// ==UserScript==
// @name Goodreads: Sort To Read by most recently added.
// @namespace Violentmonkey Scripts
// @match https://www.goodreads.com/*
// @downloadURL
// @grant none
// ==/UserScript==
const getLinksToUpdate = () => {
// Get all links to the to-read shelf that don't specify a sort order.
@fallaciousreasoning
fallaciousreasoning / the-crag-trad-filter.js
Last active August 21, 2019 02:11
A helper script for the crag for showing/hiding trad routes. This adds a button "Show/Hide Trad Routes" to the start of the Routes table.
// ==UserScript==
// @name The Crag, Only Sport
// @description A script for filtering trad climbs on the crag.
// @locale en
// @namespace Violentmonkey Scripts
// @match https://www.thecrag.com/*
// @grant none
// ==/UserScript==
const storeValue = (key, value) => localStorage.setItem(key, value);
const getValue = (key) => {
@fallaciousreasoning
fallaciousreasoning / deluge-magnet-protocol-handler.js
Created August 18, 2019 02:17
Adds support for opening magnet:// links in Deluge Web. If you want this to work for you, you'll likely have to configure the @match url to be the url of your Deluge Web, and set `dom.registerProtocolHandler.insecure.enabled` to true in your Firefox about:config, as by default protocol handlers cannot be registered on http sites.
// ==UserScript==
// @name Deluge Protocol Handler
// @namespace Violentmonkey Scripts
// @match http://192.168.86.74:8112/*
// @grant none
// ==/UserScript==
if (navigator.registerProtocolHandler)
navigator.registerProtocolHandler("magnet", "http://192.168.86.74:8112/?magnet=%s", "Deluge");
@fallaciousreasoning
fallaciousreasoning / magnet-new-tab.js
Created August 18, 2019 02:14
Opens magnet links in a new tab. This is useful if you have a website registered as a handler for magnet:// links (such as instant.io, or Deluge Web)
// ==UserScript==
// @name Magnet Links in New Tab
// @namespace Violentmonkey Scripts
// @match https://thepiratebay.*/*
// @match *://audiobookbay.*/*
// @grant none
// ==/UserScript==
const poll = (action, regularity) => {
action();
@fallaciousreasoning
fallaciousreasoning / messenger-unread-badges.js
Last active November 18, 2019 23:11
Uses the experimental Badging API to Badge messenger.com when installed as a desktop PWA.
// ==UserScript==
// @name Messenger.com Unread Count
// @namespace Violentmonkey Scripts
// @match https://www.messenger.com/*
// @grant none
// ==/UserScript==
const getUnreadCount = () => {
return document.querySelectorAll('._1ht3').length;
}
@fallaciousreasoning
fallaciousreasoning / outlook-theme-color.js
Created July 30, 2019 06:25
A ViolentMonkey/TamperMonkey/GreaseMonkey script for keeping add/updating a meta theme-color tag for Outlook.com
// ==UserScript==
// @name Set Outlook Theme Color
// @namespace Violentmonkey Scripts
// @match https://outlook.live.com/mail/*
// @grant none
// ==/UserScript==
function updateThemeColor() {
let themeMeta = document.querySelector("meta[name=theme-color]");
@fallaciousreasoning
fallaciousreasoning / outlook-unread-email-badges.js
Last active November 18, 2019 23:12
A ViolentMonkey/TamperMonkey/GreaseMonkey script for setting unread counts on Outlook.com
// ==UserScript==
// @name Outlook Unread Badge
// @namespace Violentmonkey Scripts
// @match https://outlook.live.com/mail/*
// @grant none
// ==/UserScript==
const getUnreadCount = () => {
return document.querySelectorAll(`div[aria-label~='Unread']`).length;
}