Last active
September 20, 2024 17:03
-
-
Save Chengings/c63477b1481700c1431edaa5a25008c2 to your computer and use it in GitHub Desktop.
Bookmarklets
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
javascript: (() => { | |
/mozilla.org/.test(document.location.host) && | |
(document.location.hostname = "www-dev.allizom.org"); | |
})(); |
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
javascript: (() => { | |
if (/reddit.com/.test(document.location.host)) { | |
document.location.assign( | |
`http://10.11.13.22:34567/${document.location.pathname}`, | |
); | |
} else if (/x.com/.test(document.location.host)) { | |
document.location.hostname = "xcancel.com"; | |
} else if (/youtube.com/.test(document.location.host)) { | |
document.location.hostname = "piped.video"; | |
} else if (/medium.com/.test(document.location.host)) { | |
document.location.hostname = "scribe.rip"; | |
} | |
})(); |
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
javascript:(()=>{ | |
const originalParams = (new URL(document.location)).searchParams; | |
const videoId = originalParams.get('v'); | |
const timestamp = originalParams.get('t'); | |
const url = new URL(`/embed/${videoId}`, "https://www.youtube-nocookie.com"); | |
url.searchParams.set('iv_load_policy', '1'); /* show video annotations */ | |
url.searchParams.set('modestbranding', '1'); /* disables showing the YouTube logo in the video control bar */ | |
url.searchParams.set('cc_load_policy', '1'); /* closed captions to be shown by default */ | |
if(timestamp){ | |
url.searchParams.set('start', timestamp.replace('s', '')); /* remove 's' from timestamp */ | |
} | |
document.location.href = url; | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment