NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name sanitize_www.discuss.com.hk // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author monday // @license GPL-3.0-or-later // @include https://www.discuss.com.hk/* // @include https://news.discuss.com.hk/* // @include https://finance.discuss.com.hk/* // @include https://ladies.discuss.com.hk/* // @include https://computer.discuss.com.hk/* // @include https://digital.discuss.com.hk/* // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // ==/UserScript== // function remove(obj) { // if (obj !== null && 'remove' in obj) { // obj.remove(); // } // } (function() { console.log('matched page'); // @match *://www.discuss.com.hk/* $('#superbanner').remove(); $('#featuread').remove(); $( "div[id^='div-gpt-ad']").remove(); $('.ranking-homepage-container').remove(); $('.header-promote').remove(); $('.section_hot').remove(); $(".ad-01").remove(); $("#ad_text").remove(); $(".adsbygoogle").remove(); $("#ad_type_f").remove(); $(".vdb_player").remove(); $("#rightads").remove(); $("#google_center_div").remove(); $("#startiframecm").remove(); $("div[id^='div-gpt-ad-']").remove(); $("div[id^='vdo']").remove(); $("div[class^='vdo']").remove(); $("div[id^='gna']").remove(); $("div[id^='google']").remove(); $("div[id^='ad']").remove(); $("div[iframe^='no']").remove(); $('.threadlist__legend').remove(); $('#footer_area').remove(); $('.viewthread__rpl-discuss').remove(); $("noscript").remove(); $("div[role^='dialog']").remove(); // accept cookie dialog $(".hottopics").remove(); $(".category-festival").remove(); $('.gid-landing__legend').remove(); $("div[class^='video']").remove(); $("div[class^='swiper']").remove(); $('.threadlist__hottopics').remove(); $('.threadlist__relative-fid').remove(); $("div[iframe^='google_']").remove(); $("div[class^='google_']").remove(); $('.footer-container').remove(); $('table.footer-container').remove(); $('#ad_text').remove(); $('video-js').remove(); $("div[class^='vjs-']").remove(); var videoList = document.getElementsByTagName("video"); //videoList.forEach(element => console.log(element)); // error var index = 0; for (index = 0; index < videoList.length; ++index) { console.log('found video tag '); console.log(videoList[index]); } })();