-
Notifications
You must be signed in to change notification settings - Fork 0
/
ehg-exh-generic-filterer.user.js
61 lines (56 loc) · 1.97 KB
/
ehg-exh-generic-filterer.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
53
54
55
56
57
58
59
60
61
// ==UserScript==
// @name Filter out bad content
// @namespace dragontamer8740.ehgfiltergeneric
// @description Blocks awful artists and uploaders.
// @version 1.0
// @include http://g.e-hentai.org/*
// @include http://e-hentai.org/*
// @include http://exhentai.org/*
// @include https://g.e-hentai.org/*
// @include https://e-hentai.org/*
// @include https://exhentai.org/*
// @include http://exhentai55ld2wyap5juskbm67czulomrouspdacjamjeloj7ugjbsad.onion/*
// @match http://g.e-hentai.org/*
// @match http://e-hentai.org/*
// @match http://exhentai.org/*
// @match https://g.e-hentai.org/*
// @match https://e-hentai.org/*
// @match https://exhentai.org/*
// @match http://exhentai55ld2wyap5juskbm67czulomrouspdacjamjeloj7ugjbsad.onion/*
// @grant none
// ==/UserScript==
function addArtistFilter(name)
{
var searchField = document.querySelector('input[name="f_search"]');
if(searchField != null)
{
if( searchField.value=="")
{
searchField.value +="-artist:\"" + name + "\" ";
}
//if it's already in the search field (case insensitive), don't do anything. Otherwise, add it to the end.
else if( !(searchField.value.toUpperCase().includes(("-artist:\"" + name + "\"").toUpperCase())) )
{
searchField.value +=" -artist:\"" + name + "\" ";
}
}
}
function addUploaderFilter(name)
{
var searchField = document.querySelector('input[name="f_search"]');
if(searchField != null)
{
if( searchField.value=="")
{
searchField.value +="-uploader:\"" + name + "\" ";
}
//if it's already in the search field (case insensitive), don't do anything. Otherwise, add it to the end.
else if( !(searchField.value.toUpperCase().includes(("-uploader:\"" + name + "\"").toUpperCase())) )
{
searchField.value +=" -uploader:\"" + name + "\" ";
}
}
}
addArtistFilter("xmrsmoothx");
addUploaderFilter("OHPriest");
addArtistFilter("justmegabenewell");