Any new entries that you add to your list will added to your Plan To Watch/Read list.
当前为
// ==UserScript==
// @name Add new entries to PTW/PTR
// @namespace ChangeAddBehavior
// @version 0.4
// @description Any new entries that you add to your list will added to your Plan To Watch/Read list.
// @author hacker09
// @include /^https:\/\/myanimelist\.net\/((anime|manga)(id=)?(\.php\?id=)?)(\/)?([\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
}, 900); //Finishes the settimout function
} //Finishes the onclick function
} //Finishes the if condition
})();