Simple script to export highlights from a Kindle.
Requirments
- macOS host
- Kindle plugged into Mac
- Deno installed on Mac
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
'use strict'; | |
const stateMap = new WeakMap(); | |
function useState(key, init) { | |
const update = (v) => stateMap.set(key, v); | |
if (stateMap.has(key)) { | |
return [stateMap.get(key), update]; | |
} | |
stateMap.set(key, init); | |
return [init, update]; |
/// facebook-hide-sponsored.js | |
(() => { | |
"use strict"; | |
const INTERVAL = 1500; | |
setInterval(() => { | |
let element = Array.from( | |
document.querySelectorAll( | |
`span[style="-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box"]` | |
) | |
).find(({ innerHTML }) => innerHTML.trim() === "Sponsored"); |
Simple script to export highlights from a Kindle.
Requirments
Inject this css snippet to remove all ads from your Twitter timeline.
div[data-testid="placementTracking"]:has(path[d="M19.498 3h-15c-1.381 0-2.5 1.12-2.5 2.5v13c0 1.38 1.119 2.5 2.5 2.5h15c1.381 0 2.5-1.12 2.5-2.5v-13c0-1.38-1.119-2.5-2.5-2.5zm-3.502 12h-2v-3.59l-5.293 5.3-1.414-1.42L12.581 10H8.996V8h7v7z"]) {
display: none;
}