Skip to content

Instantly share code, notes, and snippets.

@KrisYu
Last active September 27, 2018 12:44
Show Gist options
  • Save KrisYu/ab90d07612b31b6665ba2cba1fde286b to your computer and use it in GitHub Desktop.
Save KrisYu/ab90d07612b31b6665ba2cba1fde286b to your computer and use it in GitHub Desktop.
θ±†η“£εΉΏζ’­πŸ“’ε±θ”½ε‹ι‚»ηš„θ„šζœ¬γ€‚
// ==UserScript==
// @name forgetyou
// @namespace forgetyou
// @include https://www.douban.com/*
// @version 1.1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
var banNames = ['someone1', 'someone2'];
function toggle_visibility(className) {
$('.' + className).each(function( index ) {
var e = $( this );
var name;
var href = e.find('.usr-pic a').attr('href');
if (href){
if (href.indexOf('people/') != -1) {
name = href.split('people/')[1].split('/')[0];
if ($.inArray(name, banNames) !== -1) {
e.remove();
}
}
}
});
}
toggle_visibility('status-item');
// ζ₯θ‡ͺ豆瓣er
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment