Guest User

Kemono Button fantia

a guest
Jun 9th, 2022
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Kemono fantia button
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  Add kemono party button to fantia page.
  6. // @author       mbahArip
  7. // @match        https://fantia.jp/fanclubs/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=fantia.jp
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. function addButton(){
  13.         const fantiaID = parseInt(window.location.href.split('fanclubs/')[1]);
  14.         const kemonoURL = `https://kemono.party/fantia/user/${fantiaID}`
  15.  
  16.         let buttonElement = document.createElement('a');
  17.         buttonElement.className = 'btn btn-success btn-block';
  18.         buttonElement.href = kemonoURL
  19.         buttonElement.innerText = 'Kemono.party';
  20.  
  21.         document.querySelector('.fanclub-btns').append(buttonElement);
  22.  
  23. }
  24.  
  25.  
  26. (function() {
  27.     'use strict';
  28.     addButton();
  29. })();
  30.  
Advertisement
Add Comment
Please, Sign In to add comment