This file contains 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
gAsACXVpYXNtLmFzbd6WKgAAClVJQVNNX1RFWFQFX0RBVEEGREdST1VQBV9URVhUBERBVEEEQ09ERdiYBwBIAAAFBwEMmAcASA8AAwYBAJgHAEj/AQIHAQ+aBAAE/wJdjBAADVNUUklOR0FERFJFU1MAepBFAAADCmdldGNvcHlib3goAAAJZ2V0X21lbXh5FwAACmdldF9zY3JzZWcAAAAKcHV0Y29weWJveNgAAAdhdHRyYm94ZwEA4YgEAACiAdGgAwIDAABQtA/NEMcGAAAAuDwHdQbHBgAAALBYy1JQsqD24lqK1rYAAtIDwlrLVYvsHgZWV4teDosHogAAi14MiweiAACLXgqLB6IAAIteCIsHogAAi14GU5oAAAAAowAAiRYAAP4OAAD+DgAA/g4AAP4OAAAO6I3/oAAAKgYAAKIAAAQBtACjAACgAAAqBgAAogAAjgYAAIs+AAC+AACkvgAApKAAAIomAAAO6G7/i/CLDgAAHo4eAADzpR+BxqAAKzYAACs2AACAPgAAAHQG/g4AAOvbX14HH13KCgBVi+weBlZXi14KiweiAACLXgiLB6IAAIteBlOaAAAAAKMAAIkWAAD+DgAA/g4AAA7o9f4eB4s2AAAejh4AAL8AAKS/AACkH6AAAAQBtACjAACKJgAAoAAADujj/ov4jgYAAIsOAAAejh4AAPOlH4HHoAArPgAAKz4AAIA+AAAAdAb+DgAA69tfXgcfXcoGAFWL7B4GVleLXg6LB6IAAIteDIsHogAAi14KiweiAACLXgiLB6IAAIteBosHogAA/g4AAP4OAAD+DgAA/g4AAA7oVv6gAAAqBgAA/sAy5KMAAKAAACoGAACiAACgAACKJgAADuhK/ov4jgYAAKAAAIsOAABHquL8gcegACs+AAArPgAAgD4AAAB0Bv4OAADr319eBx9dygoALZwZAsQHEAECCwDEERABAgsAxDUQAQICAMQ9EAECAQDERRABAgQAxE0QAQIDAMxUVgHEWRABAgcA |
This file contains 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
javascript:(function() { var currentUrl = window.location.href; var searchQueryMatch = currentUrl.match(/q=([^&]+)/); if (searchQueryMatch && searchQueryMatch[1]) { var decodedSearchQuery = decodeURIComponent(searchQueryMatch[1].replace(/\+/g, ' ')); var duckDuckGoUrl = 'https://duckduckgo.com/?t=h_&q=' + encodeURIComponent(decodedSearchQuery); window.location.href = duckDuckGoUrl; } else { window.location.href = 'https://duckduckgo.com/'; } })(); |
This file contains 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
(async function(){ | |
const series_title = document.querySelector('[data-automation-id="title"]')?.innerText.trim(); | |
const series_synop = document.querySelector('[data-automation-id="atf-synopsis"]')?.innerText.trim(); | |
const li_arr = document.querySelectorAll('[id^="av-ep-episodes"]'); | |
let episodes = []; | |
for (const li of li_arr) { | |
const title_elem = li.querySelector('[data-automation-id^="ep-title-episodes-"]'); | |
const title_all = title_elem.innerText.trim(); | |
const title_mat = title_all.match(/^([0-9]+)\.*\s*(.*)$/); |
This file contains 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
#!/bin/bash | |
if [[ -z "$1" ]]; then | |
echo "usage : $0 [YOUTUBE_URL_OR_ID]" >&2 | |
exit 1 | |
fi | |
OK=1 | |
ffmpeg >/dev/null 2>/dev/null | |
if [[ $? -eq 127 ]]; then | |
echo "ffmpeg is required : https://ffmpeg.org/download.html" >&2 |
This file contains 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
javascript: void((function() { function disableInterests(doc) { function findSpanText(checkbox) { let elem = checkbox.parentElement; let levels = 0; while (elem && levels < 10) { let span = elem.querySelector('span'); if (span) { return span.textContent; } elem = elem.parentElement; levels++; } } let wait_ms = 100; let checkboxes = doc.querySelectorAll("div > input[type='checkbox']:checked"); let len = checkboxes.length; let done = 0; let inc = 50; checkboxes.forEach((interest) => { console.log(interest); let text = findSpanText(interest); setTimeout(function() { done++; let msg = `(${done}/${len}) ` + (text ? text : '(unknown)'); console.log(msg); doc.title = msg; interest.scrollInt |
This file contains 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
// fetLife batch change all photos to private ("friends only") | |
// | |
// usage: | |
// | |
// 1. open your first photo , URL should be https://fetlife.com/users/xxxxx/pictures/yyyyy | |
// 2. copy paste this code to your Javascript console and hit Return | |
// - a new tab (window) will open; do not close this tab | |
// - to terminate the process, close the newly-opened tab, then reload the current window/tab | |
// 3. this script doesn't work all the time; to make sure every pic is now private, repeat 1~2 again | |
// |
This file contains 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
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
ATV="$DIR/atv" | |
ATV_URL="$DIR/atv-airplay-url" | |
TMP_DIR="/tmp/play-$RANDOM" | |
HTTP_SERVER="/usr/local/bin/http-server" | |
NPM="/usr/local/bin/npm" | |
if [[ ! -f "$1" ]]; then |
This file contains 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
javascript:void(function(){function e(e){let i="",o="",t="";return e>3600&&(e-=3600*(i=Math.floor(e/3600)),i=`${i} hrs`),e>60&&(e-=60*(o=Math.floor(e/60)),o=`${o} min`),e&&(t=`${e} sec`),[i,o,t].join(" ").trim()}function i(){window.__close_timer.timer&&window.clearInterval(window.__close_timer.timer),window.__close_timer.timer="",window.__close_timer.active=!1,window.__close_timer.sec=0,window.__close_timer.title=""}if(void 0===window.__close_timer&&(window.__close_timer={}),window.__close_timer.active){let o=e(window.__close_timer.sec);return window.confirm(`%E2%8F%B2 :${o}\n%F0%9F%9A%AB%E2%8F%B2?`)?(document.title=window.__close_timer.title,void i()):void 0}let o="10m",t=document.querySelector("video");if(t){o=e(Math.floor(t.duration-t.currentTime)+5)}let _=window.prompt("%E2%8F%B2%F0%9F%92%A4 %E2%86%92%E2%9D%8C",o).trim();if(!_)return;let r=_.toLowerCase().match(/^(([0-9\.]+)\s*(hours|hour|hrs|hr|h))?\s*(([0-9\.]+)\s*(minute|minute|mins|min|m))?\s*(([0-9\.]+)\s*(seconds|second|secs|sec|s))?$/),n=0;r[2]&&(n |
This file contains 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
void(function(){ | |
function sec2time_str(sec) { | |
let h=''; | |
let m=''; | |
let s=''; | |
if (sec > 3600) { | |
h = Math.floor(sec / 3600); | |
sec -= 3600*h; | |
h = `${h} hrs`; | |
} |
This file contains 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 cocoa hide twitter annoying "Liked by XX" and "Promoted tweets" | |
// @namespace cocoabox.twitter.hide_promoted | |
// @description cocoa hide twitter annoying "Liked by XX" and "Promoted tweets | |
// @include https://twitter.com/* | |
// @version 1.0.0 | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
(function(){ |
NewerOlder