Skip to content

Instantly share code, notes, and snippets.

@uahim
uahim / netzkino.js
Last active May 30, 2024 21:39
netzkino ;P
var preparing = new Array();
var myindex = 0;
for (var i = 0, l = allkeys; i < l; ++i) {
if (Object.values(schemaObj.props["apolloState"])[i].__typename == "CmsMovie") {
if (Object.values(schemaObj.props["apolloState"])[i].externalIdentifier) {
var slug = Object.values(schemaObj.props["apolloState"])[i].slug;
if (slug) {
@uahim
uahim / deemix_rows.js
Last active April 10, 2024 17:54
deemix bookmarklet to get all rows for current view
javascript:
var rows = document.getElementsByTagName("td").length;
var allrows = "", temprowa = "", temprowb = "";
for (var i = 0, l = rows; i < l; ++i) {
temprowa = document.getElementsByTagName("td")[i].getAttribute("data-cm-link");
if ((temprowa != null) && (temprowa != temprowb)) {
allrows += temprowa + "\n";
@uahim
uahim / ksta_lolpaywall.js
Last active November 27, 2023 16:48
bypass ksta.de paywall script - bookmarklet version for Violentmonkey users
javascript:var scriptEl = document.getElementById("schema-org-graph").innerText;var schemaObj = JSON.parse(scriptEl); var sentences = schemaObj["@graph"][3].articleBody.split(". "); var formattedtext = ""; var skips = 0; for (var i = 0; i < sentences.length; i++) { if (i === skips + 5) { var breaks = "<br /><br />"; skips += 5; } else { var breaks = ""; } formattedtext += sentences[i] + ". " + breaks; } var intro = document.getElementsByClassName("dm-article__intro")[0].innerHTML; document.getElementsByClassName("dm-article-content-width")[0].innerHTML = "<strong>" + intro + "</strong><br /><br /><br />" + formattedtext + "<br /><br />";void(0);
var artistname = "Brass Against";
var output = "";
function fancyTimeFormat(duration) {
// Hours, minutes and seconds
const hrs = ~~(duration / 3600);
const mins = ~~((duration % 3600) / 60);
const secs = ~~duration % 60;
// Output like "1:01" or "4:03:59" or "123:03:59"
@uahim
uahim / imdb_soundtrack_2023.user.js
Last active January 21, 2023 20:12
fixes imdb 2023 redesign soundtrack page bullshit
// ==UserScript==
// @name imdb soundtrack
// @namespace imdb
// @description fixes imdb 2023 redesign soundtrack page bullshit
// @include https://www.imdb.com/title/tt*/soundtrack*
// @version 0.6
// @grant none
// ==/UserScript==
var repx = new RegExp("(Produced|Performed|Written|Music|Lyrics|Courtesy) (by|of|and).*", "gi");
@uahim
uahim / yt2cue.sh
Created June 14, 2022 18:19
converts YouTube 00:00 Track 1 format to tracklist and .cue files
#!/bin/bash
# usage:
# yt2cue.sh source_file "artist" "album title"
# set to 1 to debug :=)
debug=0
i="0"
> yt2cue.cue
@uahim
uahim / servustv_2022_bookmarklets.js
Last active December 17, 2022 14:15
shows the stream url to watch in VLC or to feed into ffmpeg, youtube-dl or its various forks; fix to match non-fictional content
// stream url to watch in VLC or to feed into ffmpeg, youtube-dl or its various forks
// displayed line-by-line for better readability
javascript:
var id = location.href.split("/");
var urlp = "https://dms.redbull.tv/v5/destination/stv/";
var urls = "/personal_computer/chrome/de/de_DE/playlist.m3u8";
var properid = id[id.length - 2].toUpperCase();
if (properid.match(/^AA/) != null) {
var filmtitle = document.querySelector('meta[property="og:title"]').content;
@uahim
uahim / arte_v2.sh
Last active May 19, 2024 14:41
May 2024: this will no longer work as arte stopped serving http mp4 hosting; script stays up for reference
#!/bin/bash
# usage
# arte_v2.sh <url>
# now also displays the link to high quality direct download of the mp4 and supports arte concert
# important:
# requires jq, which is "like sed for JSON data" ( https://stedolan.github.io/jq/ )
# replace with your preferred user agent
@uahim
uahim / arte.user.js
Last active June 20, 2024 15:15
get stream url - 0.1.8 updated June 2024 to account for css changes
// ==UserScript==
// @name arte stream url
// @namespace http://tampermonkey.net/
// @version 0.1.7
// @description get arte m3u8 stream url
// @author You
// @match https://www.arte.tv/de/videos/*
// @match https://www.arte.tv/fr/videos/*
// ==/UserScript==
s#:ue:#ü#g
s#:oe:#ö#g
s#:ae:#ä#g
s#:Ue:#Ü#g
s#:Oe:#Ö#g
s#:Ae:#Ä#g
s#ß#ß#g