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