From 32eefa21d15b3a957dacf0de481d58ddfaa89ab5 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Thu, 2 Nov 2023 22:44:55 +0100 Subject: [PATCH] added my userscripts --- userscripts/girlgenius.js | 50 ++++++++++++++++++++++++++++++++ userscripts/kobo_easy_archive.js | 35 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 userscripts/girlgenius.js create mode 100644 userscripts/kobo_easy_archive.js diff --git a/userscripts/girlgenius.js b/userscripts/girlgenius.js new file mode 100644 index 0000000..e8870b0 --- /dev/null +++ b/userscripts/girlgenius.js @@ -0,0 +1,50 @@ +// ==UserScript== +// @name Girlgenius https fix +// @namespace https://sebastian-tobie.de/ +// @version 0.1 +// @description converts http to https urls +// @author Sebastian Tobie +// @source https://gitea.sebastian-tobie.de/sebastian/cookiedb/raw/branch/stable/userscripts/girlgenius.js +// @run-at document-body +// @match https://www.girlgeniusonline.com/* +// @grant none +// @unwrap +// ==/UserScript== +function replacehttp(url) { + let u = new URL(url); + console.debug(u.protocol, "http:" == u.protocol) + if(u.protocol == "http:") { + let old = url.href; + u.protocol = "https:"; + console.debug("fixed url",old,u.href); + } + return u.toString(); +} + +(function() { + 'use strict'; + console.debug("http replacer loaded"); + let elements = document.getElementsByTagName("a"); + console.info("found", elements.length, "links"); + for (let i = 0 ; i