This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Default binding is ctrl+[ | |
; Selects everything before the cursor, figures out if it's a checkbox or not, changes | |
; the beginning of the line, and lands you back where you started. Those changes are: | |
; - Existing checkboxes get toggled on or off | |
; - Existing list items get turned into checklist items | |
; - Plain text lines with no prefix and blank lines are turned into checklist items | |
; Indentation is preserved in all cases. | |
; By all means redo this in AHK2 and link to it. I ain't got time to learn that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Podchaser Basic Usability Fixes | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.podchaser.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=podchaser.com | |
// @grant GM_addStyle | |
// @require https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window) { | |
window.waitForIt = (predicate, options) => { | |
if (typeof predicate !== 'function') { | |
throw new Error('predicate must be a function') | |
} | |
return new Promise((resolve, reject) => { | |
_waitForTryAgain({ | |
resolve, | |
reject, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window) { | |
// This shit is necessary because react replaces the native setter for 'value' on inputs, so we can't just change the value in the DOM. | |
// Instead we grab the setter function and call it with reflection. It's EMBARRASSINGLY slow. | |
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; | |
function setReactInputValue(input, value) { | |
nativeInputValueSetter.call(input, String(value)); | |
input.dispatchEvent(new Event('input', {bubbles: true})); | |
} | |
window.setReactInputValue = setReactInputValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateWishlist() { | |
var itemLinkRE = /\?id=(\w+)&idColor=(\w+)/ | |
var itemNodes = Array.from(document.querySelectorAll('div.flex-table__row--with-hover')) | |
var items = itemNodes.map(node => { | |
const itemLink = node.querySelector('.global-cart-item__meta-item a') | |
const partID = itemLink.text | |
const itemHref = itemLink.getAttribute('href') | |
const [, itemID, colorID] = itemLinkRE.exec(itemHref) | |
const quantity = Number.parseInt(node.querySelector('.number-input-control input').getAttribute('value')) | |
return { |