Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name MyAnimeList Back to Top for Lists
- // @description Adds a "back to top" button on your anime/manga lists.
- // @namespace V.L
- // @version 1.0
- // @match https://myanimelist.net/animelist/*
- // @match https://myanimelist.net/mangalist/*
- // @grant none
- // ==/UserScript==
- // Add CSS
- var css = `#js-top {
- position: fixed;
- bottom: 12px;
- right: 12px;
- z-index: 500;
- width: 24px;
- height: 24px;
- border: 3px solid #fff;
- border-radius: 50%;
- box-sizing: initial;
- text-align: center;
- cursor: pointer;
- }
- #js-top:before {
- content: "\\f062";
- color: #fff;
- font: 16px/24px FontAwesome;
- }
- body[data-owner=''] #js-top {
- display: none;
- }`;
- var head = document.head;
- var style = document.createElement('style');
- head.appendChild(style);
- style.type = 'text/css';
- style.appendChild(document.createTextNode(css));
- // Create Button
- document.body.innerHTML += '<a onclick="window.scrollTo(window.scrollX,0);" id="js-top" />';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement