Note: all scripts tested only in Mozilla Firefox.
Template Base template for bookmarklets/keyword searches
Localhost/production toggler
Toggle between localhost
and production
tweetbot:///mute/keyword?regex=1&text=Anaheim Angels%7CArizona Diamondbacks%7CAtlanta Braves%7CBaltimore Orioles%7CBoston Red Sox%7CChicago Cubs%7CChicago White Sox%7CCincinnati Reds%7CCleveland Guardians%7CCleveland Indians%7CColorado Rockies%7CDetroit Tigers%7CHouston Astros%7CKansas City Royals%7CLos Angeles Angels%7CLos Angeles Dodgers%7CMiami Marlins%7CMilwaukee Brewers%7CMinnesota Twins%7CNew York Mets%7CNew York Yankees%7COakland Athletics%7CPhiladelphia Phillies%7CPittsburgh Pirates%7CSan Diego Padres%7CSan Francisco Giants%7CSeattle Mariners%7CSt. Louis Cardinals%7CTampa Bay Rays%7CToronto Blue Jays%7CWashington Nationals |
/* jshint esversion: 8 */ | |
/* globals module */ | |
module.exports = { | |
env: { | |
browser: true, | |
node: true, | |
}, | |
extends: "airbnb", | |
parser: "@babel/eslint-parser", | |
parserOptions: { |
/* jshint esversion: 8 */ | |
(function () { | |
const fallback = null; | |
const keyword = "%s"; | |
const service = "https://www.example.com/"; | |
const suffix = ""; | |
if (keyword !== "" || keyword !== "%" + "s") { | |
window.location = `${service}?q=${keyword}${suffix}`; | |
} else { |
/* jshint esversion: 8 */ | |
(function () { | |
const domain = "https://example.com"; | |
const isLocalhost = window.location.href.indexOf("localhost") >= 0; | |
const localhost = "http://localhost:8080"; | |
const pathname = window.location.pathname; | |
const url = isLocalhost ? (domain + pathname) : (localhost + pathname); | |
window.location = url; | |
})(); |
/* jshint esversion: 8 */ | |
(function () { | |
// List of verbs, for editing convenience | |
// am | |
// are | |
// be | |
// been | |
// being | |
// go | |
// hasn't |
# Find and remove `.ds_store` files from local `git` repo | |
find . -name .ds_store -print0 | xargs -0 git rm -f --ignore-unmatch |
/* jshint esversion: 8 */ | |
(function (currentDocument) { | |
const treeWalker = currentDocument.createTreeWalker(currentDocument.body, NodeFilter.SHOW_ELEMENT); | |
const width = currentDocument.documentElement.offsetWidth; | |
while (treeWalker.nextNode()) { | |
const domRectangle = treeWalker.currentNode.getBoundingClientRect(); | |
if (domRectangle.right > width || domRectangle.left < 0) { | |
const currentNode = treeWalker.currentNode; |
Note: all scripts tested only in Mozilla Firefox.
Template Base template for bookmarklets/keyword searches
Localhost/production toggler
Toggle between localhost
and production
/* jshint esversion: 8 */ | |
(function () { | |
// Sweden (`sv`) outputs something close to ISO | |
const currentDate = new Date().toLocaleDateString("sv", { | |
timeZone: "America/Chicago", | |
}); | |
const parameters = | |
"?locations=51&programs=5c9261756fdc8d742d2296a5" + | |
"&startDate" + | |
currentDate.split("T")[0].replace("T", ""); |