Greasy Fork is available in English.

Top Button for 9anime

Read the name (Has MAL-Sync support so it doesn't get in the way)

Version vom 02.06.2020. Aktuellste Version

// ==UserScript==
// @name         Top Button for 9anime
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Read the name (Has MAL-Sync support so it doesn't get in the way)
// @author       SoaringGecko
// @match        https://9anime.ru/*
// @grant        none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Circle-icons-arrow-up.svg/600px-Circle-icons-arrow-up.svg.png
// ==/UserScript==


    $("body").append ( `
    <div id="gmSomeID">
        <style>
#topBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #694ba1;
  color: #ddd;
  cursor: pointer;
  padding: 15px;
  border-radius: 4px;
}

#topBtnWithMal {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 47px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #694ba1;
  color: #ddd;
  cursor: pointer;
  padding: 15px;
  border-radius: 4px;
}
</style>
        <button onclick="topFunction()" id="topBtn" title="Go to top" style="-ms-transform: rotate(90deg); /* IE 9 */-moz-transform: rotate(90deg); /* Firefox */-webkit-transform: rotate(90deg); /* Safari and Chrome */-o-transform: rotate(90deg); /* Opera */">&lt;</button>
<script>
//Get the button
var mybutton = document.getElementById("topBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
  if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
    mybutton.style.display = "block";
  } else {
    mybutton.style.display = "none";
  }
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
  document.body.scrollTop = 0;
  document.documentElement.scrollTop = 0;
}

  var x = document.getElementById("floatbutton");
  if ($( ".floatbutton" ).length) {
    document.getElementById("topBtn").id = "topBtnWithMal";
  }


</script>
    </div>
` );