Skip to content

Instantly share code, notes, and snippets.

@bluven
Last active March 15, 2021 08:54
Show Gist options
  • Save bluven/5cf16e730a45388a445bd7e9f2b1d845 to your computer and use it in GitHub Desktop.
Save bluven/5cf16e730a45388a445bd7e9f2b1d845 to your computer and use it in GitHub Desktop.
一些油猴脚本
// ==UserScript==
// @name 电影天堂去广告
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://www.dygod.net/*
// @match *://www.javbus.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setInterval(function(){
["HMcoupletDivleft", "HMRichBox", "HMcoupletDivright"].forEach(function(id){
let el = document.getElementById(id);
if (el) {
el.remove();
}
});
let elements = document.getElementsByClassName('ad-list');
for(let i = 0; i < elements.length; i++) {
elements[i].remove();
}
}, 1000);
})();
// ==UserScript==
// @name 微博清洁
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://weibo.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.6.0.min.js
// ==/UserScript==
(function() {
'use strict';
setInterval(function(){
$(".WB_cardwrap").each((i, element) => {
if(element.getAttribute('feedtype') === 'ad') {
element.remove()
}
});
}, 5000);
setTimeout(function(){
$("#v6_trustPagelet_recom_member").remove();
$("#v6_pl_rightmod_recominfo").remove();
$("#v6_pl_rightmod_rank").remove();
$("#__sidebar").remove();
$($("#homeWrap").children()[1]).find(".woo-box-item-inlineBlock").slice(2, 6).each((i, e) => e.remove());
}, 3000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment