Greasy Fork镜像 is available in English.

Add new entries to PTW

Any new entries that you add to your list will added to your Plan To Watch list.

Versión del día 21/5/2021. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Add new entries to PTW
// @namespace    ChangeAddBehavior
// @version      0.1
// @description  Any new entries that you add to your list will added to your Plan To Watch list.
// @author       hacker09
// @include      /^https:\/\/myanimelist\.net\/(anime|manga)\/[\d]+(\/.*)?/
// @icon         https://www.google.com/s2/favicons?domain=myanimelist.net
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  if (document.querySelector("#myinfo_status.btn-user-status-add-list.js-form-user-status.js-form-user-status-btn.myinfo_addtolist") !== null) { //If the anime is not on the user list
    document.querySelector("#myinfo_status.btn-user-status-add-list.js-form-user-status.js-form-user-status-btn.myinfo_addtolist").href = 'javascript:void(0);'
    document.querySelector("#myinfo_status.btn-user-status-add-list.js-form-user-status.js-form-user-status-btn.myinfo_addtolist").dataset.value = 6; //Add it as PTW

    document.querySelector("#myinfo_status.btn-user-status-add-list.js-form-user-status.js-form-user-status-btn.myinfo_addtolist").onclick = function() //When the Add button is clicked
    { //Starts the onclick function
      setTimeout(function() { //Wait the entry be added to the user list
        document.querySelector("#myinfo_status").value = '6'; //Set the anime as plan to watch, in a way that the user can see
        document.querySelector("#myinfo_status").dataset.class = 'plantowatch'; //Change the selection box to grey
      }, 700); //Finishes the settimout function
    } //Finishes the onclick function
  } //Finishes the if condition
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。