Quick link to Kemono page from Patreon
当前为
// ==UserScript==
// @name Kemono.su link on Patreon
// @namespace http://tampermonkey.net/
// @version 1.0.1
// @description Quick link to Kemono page from Patreon
// @author aqemi
// @match https://www.patreon.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=patreon.com
// @grant none
// @license MIT
// ==/UserScript==
(function() {
window.addEventListener('load', function() {
const base = __NEXT_DATA__.props.pageProps.bootstrapEnvelope.pageBootstrap;
const {included} = base.post ?? base.campaign;
const includedEntry = included.find(x => x.type === 'user');
const link = `https://kemono.su/patreon/user/${includedEntry?.id}`;
console.info(link);
document.body.insertAdjacentHTML('beforeend', `<div style="position:fixed;top: 20px;right:20px;background:#e6702f;border-radius:50px;padding:12px 24px;z-index:9999;">
<a href="${link}" target="_blank" class="patreon-btn" style="color: white; font-weight: bold; text-decoration: none; font-size: 16px;">
Kemono
</a>
</div>`)
}, false);
})();