forked from dodying/UserJs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemptyName.user.js
46 lines (45 loc) · 1.37 KB
/
emptyName.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
// ==UserScript==
// @name []emptyName
// @namespace https://github.com/dodying/UserJs
// @version 1.1
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
// @noframes
// @author dodying
// @namespace https://github.com/dodying/UserJs
// @supportURL https://github.com/dodying/UserJs/issues
// @icon https://cdn.jsdelivr.net/gh/dodying/UserJs@master/Logo.png
// @run-at document-idle
// @include *
// ==/UserScript==
(function () {
'use strict'
var host = window.location.host
GM_registerMenuCommand('Add to White', function () {
addList(host, 0)
}, 'w')
GM_registerMenuCommand('Add to Black', function () {
addList(host, 1)
}, 'b')
var list = GM_getValue('list', {})
if (host in list) {
if (list[host] === 1) document.title = ''
return
}
var blackWord = ['性', '父', '母', '爸', '妈', '姊', '姐', '妹', '哥', '兄', '弟', '女儿', '姑', '嫂', '舅', '丰满', '鸡巴', '柔嫩', '女儿', '乱伦', '乳', '屁股', '淫', '欲', '色', '成人']
var t = document.title
var i
for (i = 0; i < blackWord.length; i++) {
if (t.match(blackWord[i])) {
addList(host, 1)
break
}
}
function addList (host, status) {
var list = GM_getValue('list', {})
list[host] = status
GM_setValue('list', list)
if (status) document.title = ''
}
})()