MyDramaListCompletedHighlight

Simple highlights of movies and shows you already finished.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        MyDramaListCompletedHighlight
// @description Simple highlights of movies and shows you already finished.
// @namespace   mdl
// @include     http://mydramalist.com/browse/*
// @include     http://mydramalist.com/shows/top*
// @include     http://mydramalist.com/movies/top*
// @version     1.02
// @grant       none
// ==/UserScript==
$(window).ready(function ()
{
  
  var color = 'yellow'; //Chose Color for the background.
  
  
  
  
  var username = $('body').find('.username').text();
  var onList = null;
  $.ajax({
    url: 'http://mydramalist.com/dramalist/' + username,
    type: 'GET',
    success: function (data) {
      itemlists(data,color);
    }
  });
  function itemlists(data,color)
  {
    $('.btnManageList').each(function ()
    {
      var btn = $(this);
      var titleId = $(this).data('id');
      onList = $(data).find('table#list_2').find('.btnManageList[data-id=' + titleId + ']').data('id');
      if (onList == titleId)
      {
       
        btn.parents().eq(2).css('background-color', color);
      }
    });
  }
});