// ==UserScript== // @name MDL Updates // @namespace http://hermanfassett.me // @version 0.1 // @description Small changes to mydramalist // @author You // @match *://mydramalist.com/* // @grant GM_addStyle // @downloadURL https://update.greasyfork.cloud/scripts/387640/MDL%20Updates.user.js // @updateURL https://update.greasyfork.cloud/scripts/387640/MDL%20Updates.meta.js // ==/UserScript== (function() { 'use strict'; GM_addStyle('.airing.not { background-color: #f0ad4e !important; }'); // Get api token function getToken() { var t = window.document.cookie.match("(^|;)\\s*jl_sess\\s*=\\s*([^;]*)\\s*(;|$)"); return t ? decodeURIComponent(t[2]) : null } // Add a status (upcoming, airing, aired) column to watchlists and add upcoming tag in title column function addStatusColumnToWatchlist() { $("thead").each(function(index) { let tr = $(this).find("tr"); if (tr) { let lastLink = tr.children().last().find("a").attr("href"); let newLink = lastLink.replace(/sortTable\((\d+),(\d+)\)/, ($0, $1, $2) => `sortTable(${(parseInt($1)+1)},${$2})`); tr.append(`