Generate patreon links for reactionsBot

This script generates buttons on kemono.party which a copy a link to the clipboard that is usable for the reactionBot

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Generate patreon links for reactionsBot
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  This script generates buttons on kemono.party which a copy a link to the clipboard that is usable for the reactionBot
// @author       Rerte
// @match        https://kemono.party/patreon/user/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=kemono.party
// @grant        none
// ==/UserScript==




let toggle;
//${art.querySelector("header").innerText.toLowerCase().replaceAll(" ","-")}-
document.querySelectorAll("article").forEach(art=> {
    let string = `https://www.patreon.com/join/${document.querySelector('span[itemprop="name"]').innerHTML}/checkout?rid=0&redirect_uri=https://www.patreon.com/posts/${art.attributes.getNamedItem("data-id").value}`;
    let but = document.createElement("button")
    but.innerText = "Link"
    but.onclick=()=>{toggle=true;navigator.clipboard.writeText(string).then(()=>but.innerText="Copied to Clipboard")}
    art.querySelector("a").append(but)
    art.onclick=hrefCheck;
}   )

function hrefCheck(){
    if(toggle){
        toggle=false;
        return false;
    }
}