added my userscripts
Dieser Commit ist enthalten in:
Ursprung
9e65336dd5
Commit
32eefa21d1
|
@ -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<elements.length;i++) {
|
||||||
|
let el = elements[i];
|
||||||
|
console.debug("checking", el)
|
||||||
|
if(el.href == undefined || el.href == "") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
el.href = replacehttp(el.href);
|
||||||
|
console.debug("edited", el)
|
||||||
|
}
|
||||||
|
elements = document.getElementsByTagName("img");
|
||||||
|
console.info("found", elements.length, "images");
|
||||||
|
for (let i = 0 ; i<elements.length;i++) {
|
||||||
|
let el = elements[i];
|
||||||
|
console.debug("checking", el)
|
||||||
|
if(el.src == undefined || el.src == "") {
|
||||||
|
console.debug("href == undefined", el.src == undefined , "src == ''",el.src == "")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
el.src = replacehttp(el.src);
|
||||||
|
console.debug("edited", el)
|
||||||
|
}
|
||||||
|
})();
|
|
@ -0,0 +1,35 @@
|
||||||
|
// ==UserScript==
|
||||||
|
// @name Kobo library easy archive
|
||||||
|
// @namespace https://sebastian-tobie.de/
|
||||||
|
// @version 0.1
|
||||||
|
// @description Helps with archiving kobo books
|
||||||
|
// @author Sebastian Tobie
|
||||||
|
// @source https://gitea.sebastian-tobie.de/sebastian/cookiedb/raw/branch/stable/userscripts/kobo_easy_archive.js
|
||||||
|
// @run-at document-idle
|
||||||
|
// @match https://www.kobo.com/de/de/library/books
|
||||||
|
// @match https://www.kobo.com/de/de/library/books?*
|
||||||
|
// @icon https://www.google.com/s2/favicons?sz=64&domain=kobo.com
|
||||||
|
// @grant none
|
||||||
|
// @unwrap
|
||||||
|
// ==/UserScript==
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
let he = document.getElementsByClassName("headers-end")[0];
|
||||||
|
let header = document.createElement("span");
|
||||||
|
header.classList.add("heading");
|
||||||
|
header.classList.add("more-actions");
|
||||||
|
he.appendChild(header);
|
||||||
|
let library_list = document.getElementsByClassName("library-items")[0];
|
||||||
|
for(let c = 0; c < library_list.childElementCount; c++) {
|
||||||
|
let child = library_list.children[c];
|
||||||
|
let item_bar = child.getElementsByClassName("item-bar")[0];
|
||||||
|
if(!child.classList.contains("pre-order")){
|
||||||
|
let button = child.getElementsByClassName("remove-from-library")[0];
|
||||||
|
let parent = button.parentNode
|
||||||
|
parent.removeChild(button);
|
||||||
|
item_bar.appendChild(button);
|
||||||
|
} else {
|
||||||
|
item_bar.appendChild(document.createElement("span"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
Laden…
In neuem Issue referenzieren