-
Notifications
You must be signed in to change notification settings - Fork 2
/
toggle_hentai.user.js
52 lines (45 loc) · 1.33 KB
/
toggle_hentai.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// ==UserScript==
// @name AnimeBytes Hide Hentai Images
// @author pillows
// @description Hide hentai covert art in torrents
// @include *https://animebytes.tv*
// @version 1.0
// @icon http://animebytes.tv/favicon.ico
// @require http://code.jquery.com/jquery-2.2.4.min.js
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
$(document).ready(function(){
var currentURL = window.location.href;
$(".ue_list").append("<li>\r\n \
<span class=\"ue_left strong\">Toggle Hentai Cover Art<\/span>\r\n \
<span class=\"ue_right\">\r\n \
<input type=\"checkbox\" id=\"togglehart\">\r\n \
<label for=\"togglehart\">Disable hentai cover art.<\/label>\r\n \
<\/span>\r\n \
<\/li>");
$("#togglehart").prop("checked",GM_getValue("toggle"));
$("#togglehart").on("change",function(){
GM_setValue("toggle",this.checked);
});
if(currentURL.indexOf("torrents.php") > -1)
{
if(GM_getValue("toggle") == true)
{
if(currentURL.indexOf("id=") > -1)
{
if($(".group_torrent:contains('hentai')"))
$(".scaledImg").hide();
}
else if(currentURL.indexOf("searchstr="))
{
$(".group_cont").each(function(index){
if($(this).html().indexOf('hentai (18+)') != -1)
{
$(this).find("span.mainimg").hide();
}
});
}
}
}
});