Better Buttons to Change The Status Of Animes/Mangas And To Add Scores

This script will remove the dropdown selection of the options Watching,Completed,Plan To Watch and Dropped, and does the same for the Score button.This makes a bit easier and faster to select what you want.The script also adds a button to delete the anime/manga entry of your list.

目前為 2020-11-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Better Buttons to Change The Status Of Animes/Mangas And To Add Scores
// @namespace    betterbuttonstomal2
// @version      0.7
// @description  This script will remove the dropdown selection of the options Watching,Completed,Plan To Watch and Dropped, and does the same for the Score button.This makes a bit easier and faster to select what you want.The script also adds a button to delete the anime/manga entry of your list.
// @author       hacker09
// @include      /^https:\/\/myanimelist\.net\/anime\/[0-9]+\/*
// @include      /^https:\/\/myanimelist\.net\/manga\/[0-9]+\/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';
  var $ = window.jQuery; //Defines That The Symbol $ Is A jQuery
  var animeid = location.pathname.match(/\d+/)[0];
  var token = document.head.querySelector("[name='csrf_token']").content;
  document.querySelectorAll("#myinfo_status")[1].size = "5"; //Set the size for the Status button
  document.querySelectorAll("#myinfo_status")[1].setAttribute("style", "font-size: 13.2px; background-image: none; overflow: hidden;"); //Set the css for the status button
  document.querySelectorAll("#myinfo_score")[1].size = "11"; //Set the size for the Score button
  document.querySelectorAll("#myinfo_score > option:nth-child(1)")[1].innerText = 'Reset Score'; //Change the text "selection" to Reset Score
  document.querySelectorAll("#myinfo_score")[1].setAttribute("style", "background-image: none; overflow: hidden; padding : 5px; width: 100px;"); //Set the css for the score button
  document.querySelector("div.di-ib.form-user-episode.ml8").setAttribute("style", "width: 125px;");
  document.querySelectorAll("#myinfo_watchedeps")[1].setAttribute("style", "width: 25px;");
    //*****************************************************************************************************************************************************
  var DeleteBTN = document.createElement("input");
  document.querySelectorAll("#myinfo_status")[1].parentElement.appendChild(DeleteBTN);
  $(DeleteBTN).attr({value: "Delete",id: "DeleteBTN",class: "inputButton ml8 delete_submit",type: "button",style: "margin-left: 30px!important;"});
  if (window.location.pathname.split('/')[1] === 'anime') {var entrytype = 'anime'} else {var entrytype = 'manga'}
   document.querySelector("#DeleteBTN").addEventListener("click", (async function(){await fetch("https://myanimelist.net/ownlist/"+entrytype+"/"+animeid+"/delete", {"headers": {"content-type": "application/x-www-form-urlencoded"},"body": "csrf_token="+token+"","method": "POST"});
location.reload();
}));
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址