Greasy Fork is available in English.

CSS: uakino.best

Corrections to UI of uakino.best

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name          CSS: uakino.best
// @description   Corrections to UI of uakino.best
// @author        MK
// @namespace     max44
// @homepage      https://greasyfork.org/en/users/309172-max44
// @match         *://uakino.best/*
// @match         *://*.uakino.best/*
// @match         *://uakino.me/*
// @match         *://*.uakino.me/*
// @icon          https://uakino.best/templates/uakino/images/icons/favicon-32x32.png
// @version       1.0.0
// @license       MIT
// @run-at        document-idle
// ==/UserScript==

(function() {
  'use strict';

  //Workaround: This document requires 'TrustedHTML' assignment
  if (window.trustedTypes && trustedTypes.createPolicy) {
    if (!trustedTypes.defaultPolicy) {
      const passThroughFn = (x) => x;
      trustedTypes.createPolicy('default', {
        createHTML: passThroughFn,
        createScriptURL: passThroughFn,
        createScript: passThroughFn,
      });
    }
  }

  //CSS for any mode
  var css = `
  /*Change color of episodes*/
  .playlists-items li.watched:not(.active) {
    border-color: #562318 !important;
    color: #888888 !important;
  }
  .playlists-items li.watched:not(.active) > span {
    opacity: 0.5 !important;
  }
  .playlists-items li.notwatched:not(.active) {
    background-color: #3F1810 !important;
  }
  .playlists-items li.notwatched:not(.active) > span {
    opacity: 0.2 !important;
  }
  .playlists-items li:not(.active):hover {
    background-color: #6B2B1D !important;
  }
  `;

  const rootCallback = function (mutationsList, observer) {
    //Add classes to episodes
    document.querySelectorAll(".playlists-items li:not(.watched) > span.watched").forEach(makeWatched);
    document.querySelectorAll(".playlists-items li:not(.notwatched) > span:not(.watched)").forEach(makeNotWatched);
  }

  const rootNode = document.querySelector("body");
  if (rootNode != null) {
    const rootObserver = new MutationObserver(rootCallback);
    rootObserver.observe(rootNode, {childList: true, subtree: true, attributes: true, characterData: false});
  }

  function makeWatched(link) { //Mark episodes as watched
    link.parentElement.className = link.parentElement.className.replace( /(?:^|\s)watched(?!\S)/g , '' );
    link.parentElement.className = link.parentElement.className.replace( /(?:^|\s)notwatched(?!\S)/g , '' );
    link.parentElement.className += " watched";
  }

  function makeNotWatched(link) { //Mark episodes as not watched
    link.parentElement.className = link.parentElement.className.replace( /(?:^|\s)watched(?!\S)/g , '' );
    link.parentElement.className = link.parentElement.className.replace( /(?:^|\s)notwatched(?!\S)/g , '' );
    link.parentElement.className += " notwatched";
  }

  if (typeof GM_addStyle != 'undefined') {
    GM_addStyle(css);
  } else if (typeof PRO_addStyle != 'undefined') {
    PRO_addStyle(css);
  } else if (typeof addStyle != 'undefined') {
    addStyle(css);
  } else {
    var node = document.createElement('style');
    node.type = 'text/css';
    node.appendChild(document.createTextNode(css));
    document.documentElement.appendChild(node);
  }

})();