Skip to content

Instantly share code, notes, and snippets.

@uahim
uahim / amazon_music_tracklist_clipboard.js
Created October 23, 2024 16:54
amazon music copy tracklist to clipboard bookmarklet
var nix = "";
for (var i = 0, len = document.getElementsByClassName("col1").length; i < len; ++i) {
var it = document.getElementsByClassName("col1")[i].innerText;
if (it.indexOf("&") == -1) { // optional, obviously
nix += document.getElementsByClassName("col1")[i].innerText + "\n";
}
}
navigator.clipboard.writeText(nix)
@uahim
uahim / sorttable.js
Created September 15, 2024 19:15
sort tables
/*
SortTable
version 2
7th April 2007
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
Instructions:
Download this file
Add <script src="sorttable.js"></script> to your HTML
Add class="sortable" to any table you'd like to make sortable
@uahim
uahim / nyt_paywall_breaker.js
Last active September 28, 2024 21:33
new york times paywall breaker
var t = "";$ = function(_) {return document.getElementsByTagName(_)}
for (var i = 0, l = __preloadedData.initialData.data.article.sprinkledBody.content.length; i < l; ++i) {
var n = __preloadedData.initialData.data.article.sprinkledBody;
if (n.content[i].__typename == "ParagraphBlock") {t += '<p class="css-at9mc1 evys1bk0">' + n.content[i].content[0].text + "</p><br /><br />";}
}
$("body")[0].innerHTML = '<blockquote style="padding:255px"><p class="css-at9mc1 evys1bk0">' + $("header")[1].innerHTML + t + "</p></blockquote>";
@uahim
uahim / XMLHttpRequest.js
Last active August 14, 2024 18:51
XMLHttpRequest.js example
var getJSON = function(url, callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'json'; // or html (returns as accessible document!) or text (default):
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
xhr.onload = function() {
var status = xhr.status;
var cuii = new Array()
var j = 0;
for (var i = 0, l = document.getElementsByTagName("td").length; i < l; ++i) {
var td = document.getElementsByTagName("td")[i];
if ((td.innerText.indexOf(".") != -1) && (td.innerText.indexOf("jokerguide") == -1)) {
var url = 'https://' + document.getElementsByTagName("td")[i].innerText + '/';
cuii[j] = '<a href="' + url + '">' + url + '</a><br />\n';
j++;
@uahim
uahim / html5_video_playpause_.js
Last active August 13, 2024 16:47
html5 video play/pause toggle universal bookmarklet incl. zattoo condition
javascript: var v; if (location.host == "zattoo.com" ) { v = document.getElementById("player_video_node") } else { v = document.getElementsByTagName("video")[0] } v.paused == false ? v.pause() : v.play(); void(0);
@uahim
uahim / tv-de.md
Last active August 24, 2024 23:43
legales tv-streaming in deutschland, private und öffentlich-rechtliche plus filme und serien im on-demand-streaming
@uahim
uahim / html5_video_playpause.js
Created August 10, 2024 17:17
html5 video timeshift: always "play/pause" on live tv bookmarklet
javascript:var vid = document.getElementsByTagName("video")[0];vid.paused == false ? vid.pause() : vid.play();void(0);
@uahim
uahim / generate_joyn_channellist.js
Created August 10, 2024 17:08
generate joyn free channellist
// use in console
var channels = "";
for (var i = 0, l = schemaObj.props.pageProps.liveStreams.length; i < l; ++i) {
var chan = schemaObj.props.pageProps.liveStreams[i];
if (chan.id.indexOf("-hd") == -1 ) {
//if (chan.brand.path == null) {
@uahim
uahim / joyn-senderliste.md
Last active August 10, 2024 19:14
joyn Senderliste (nur kostenlose)