Created
May 2, 2014 23:34
-
-
Save suzaku/5a284c1b9f1803b6d197 to your computer and use it in GitHub Desktop.
豆瓣电影首页[正在热映]中去掉分数低于7的条目
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var hot_movies = document.querySelectorAll('.ui-slide-item'); | |
[].forEach.call( | |
hot_movies, | |
function (e) { | |
var rate = e.getAttribute('data-rate'); | |
rate = parseInt(rate, 10); | |
if (!isNaN(rate) && rate < 7) { | |
e.remove(); | |
} | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment