TED

Hide readed article

Ajankohdalta 13.6.2016. Katso uusin versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name     TED
// @description Hide readed article
// @include    https://www.ted.com/*
// @include    http://www.ted.com/* 
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js
// @version 0.0.1.20160613115023
// @namespace https://greasyfork.org/users/38384
// ==/UserScript==

 $(function() {
    var myArray = ['May 2017'];
    var tempArray = ['How my son', 'Chinese zodiac', 'genome and build', 'Drawings that show'];
    var time = $(".meta__item .meta__val").length;
    for (var j=0; j<time; j++) {
        for (var i=0; i<myArray.length; i++) {
            if ($('.meta__item .meta__val').eq(j).html().trim() == myArray[i]) {
              $('.meta__item .meta__val').eq(j).closest('.col').css("opacity", "0.1");
            }
        }
        for (var i=0; i<tempArray .length; i++) {
            if ($('.media__message h4 a').eq(j).html().trim().indexOf(tempArray[i]) != -1) {
              $('.meta__item .meta__val').eq(j).closest('.col').css("opacity", "0.1");
            }
        }
   }
  });