pogdesign: make better

-

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        pogdesign: make better
// @namespace   userscript1
// @match       https://www.pogdesign.co.uk/cat/*
// @grant       none
// @version     0.1.5
// @author      -
// @description -
// @license     GPLv3
// ==/UserScript==

(function() {
  'use strict';

  // util functions
  const  $ = document.querySelector.bind(document);
  const $$ = document.querySelectorAll.bind(document);
  function log(s) { console.log(s); };

  // only show new shows/seasons and final episodes
  $$('.ep.info:not(.lep):not(.fep):not(.pep)').forEach(d => d.style.display = 'none');

  const today = $('div.today');
  if (!today) { return }; // looking at another month

  // remove today highlight because it overrides the episode highlights
  today.classList = 'day';

  // jump to today
  today.scrollIntoView();


  function fixthings() {
    // change all days before today
    const d = new Date();
    const day = d.getDate();
    const month = d.getMonth() + 1;
    const year = d.getFullYear();
    const todayID = `d_${day}_${month}_${year}`;

    var done = false;
    $$('#month_box .day').forEach(day => {
        if (day.id == todayID) { done = true; }
        if (!done) {
          day.style.background = '#00000000';
        }
      });
  }

  // change color of previous days
  fixthings();
  setInterval(fixthings, 10000);


})();