MyAnimeList auto confirm updated entry

Automatically goes back to anime page after successfully updating an entry

目前為 2018-01-29 提交的版本,檢視 最新版本

// ==UserScript==
// @name         MyAnimeList auto confirm updated entry
// @namespace    https://greasyfork.org/en/users/96096-purple-pinapples
// @version      0.1.1
// @description  Automatically goes back to anime page after successfully updating an entry
// @author       PurplePinapples
// @license      WTFPL
// @run-at       document-end
// @match        https://myanimelist.net/editlist.php?type=anime&id=*
// @match        https://myanimelist.net/panel.php?go=editmanga&id=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    if ($("#content > .goodresult > strong:contains('Successfully updated entry.')").length > 0) {
        if (location.href.indexOf("anime&id") > 0) {
            location.href = ($("#content > .goodresult > a[href*='/anime/']").attr("href"));
        } else {
            location.href = ($("#content > .goodresult > a[href*='/manga/']").attr("href"));
        }
    }
})();