Newegg Smart TV Filter

"Smart" TVs are a bad thing. When browsing newegg for TVs, skip anything that admits to being a smart tv.

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     Newegg Smart TV Filter
// @version  1
// @grant    none
// @match 	 *://*.newegg.com/*
// @require	 https://code.jquery.com/jquery-3.4.1.min.js
// @description:en  "Smart" TVs are a bad thing. When browsing newegg for TVs, skip anything that admits to being a smart tv.
// @namespace adamrgrey.com
// @description "Smart" TVs are a bad thing. When browsing newegg for TVs, skip anything that admits to being a smart tv.
// ==/UserScript==

let oldJQueryContains = jQuery.expr[':'].contains;
jQuery.expr[':'].contains = function(a, i, m) {
  return jQuery(a).text().toUpperCase()
      .indexOf(m[3].toUpperCase()) >= 0;
};

if($("li.is-current:contains('TV')").length > 0){
	$(".item-container a:contains('smart')").parent().parent().replaceWith("<div class=\"item-container\">smart</div>");  
}

jQuery.expr[':'].contains = oldJQueryContains;