Skip to content

Instantly share code, notes, and snippets.

var oldEpisode, tracklist = "";
var loop = setInterval(() => {
var newEpisode = document.querySelector("h2").innerText;
if (newEpisode != oldEpisode) {
console.log(newEpisode);
setTimeout(() => document.querySelector('[class^="ShowMore___"]')?.click(), 500);
setTimeout(() => {
document.querySelectorAll('[data-rbd-droppable-id="table-body"] > .ant-row p').forEach(i => {
title = i.innerText;
artist = i.parentElement.parentElement.querySelector('[class^="ant-row SongPreviewPlayer___"]').innerText;
@CennoxX
CennoxX / ZipExtractor.cs
Last active April 5, 2023 07:23
Extract a zip file to a folder if there are multiple files inside, extract directly if there is only one file. Afterwards the zip file will be deleted. As it should be.
using System;
using System.Diagnostics;
using System.Text.RegularExpressions;
partial class ZipExtractor
{
static void Main(string[] args)
{
// get the name of the zip file to extract
string filename = args[0];
@CennoxX
CennoxX / getThisOrThatAnswer.js
Last active January 4, 2024 11:04
click at the correct this or that answer at rewards.bing.com
function getAnswerCode(key, str) {
let t = 0;
for (let i = 0; i < str.length; i++) {
t += str.charCodeAt(i);
}
t += parseInt(key.slice(-2), 16);
return t.toString();
}
Function(document.querySelector("link~script").innerHTML.split(/\n/)[1]);
var answer0 = document.querySelector("#rqAnswerOption0");
@CennoxX
CennoxX / convertCutlistToM3u.js
Last active March 25, 2023 22:09
Converts OnlineTvRecorder cutlists to m3u format, to play with VLC-Player, set the starttime to change the beginning of the video. Internally this converts the cutlist-format to a json representation and thus makes it possible to be the starting point for further transformations.
function convertCutlistToM3u(cutlist, starttime = null) {
var obj = {};
var lastKey;
cutlist.split(/\n\n?/).forEach(l => {
var [, key] = l.match(/\[(.*)]/) || [];
if (key) {
obj[key] = {}
lastKey = key;
} else {
var [prop, val] = l.split("=");
@CennoxX
CennoxX / sublime.js
Created May 31, 2022 09:26
Bookmarklet to use shortcut [Ctrl]+[Alt]+[d] for Select Next Occurence on Tampermonkey
javascript:document.addEventListener("keydown",function(e){if(e.ctrlKey&&e.altKey&&e.key=="d"){[...document.querySelectorAll(".editormenu>li:nth-child(3)>table>tr:nth-child(10)")].filter(i => i.closest('[name="tabview_contentmain"]').style.display != "none")[0].click();[...document.querySelectorAll(".editormenu>li:nth-child(3)>table")].filter(i => i.closest('[name="tabview_contentmain"]').style.display != "none")[0].classList.remove("visible");}});
m(x) ... minutes of the time x
h(x) ... hours of the time x
add time
a+b=c
if (m(c)>=60) || (h(a)+h(b)>h(c))
c=c+40
subtract time
a-b=c