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.39 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
/* eslint-env browser */
// ==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://gitee.com/dodying/userJs/raw/master/Logo.png
// @run-at document-idle
// @include *
// ==/UserScript==
(function () {
const { host } = window.location;
GM_registerMenuCommand('Add to White', () => {
addList(host, 0);
}, 'w');
GM_registerMenuCommand('Add to Black', () => {
addList(host, 1);
}, 'b');
const list = GM_getValue('list', {});
if (host in list) {
if (list[host] === 1) document.title = '';
return;
}
const blackWord = ['性', '父', '母', '爸', '妈', '姊', '姐', '妹', '哥', '兄', '弟', '女儿', '姑', '嫂', '舅', '丰满', '鸡巴', '柔嫩', '女儿', '乱伦', '乳', '屁股', '淫', '欲', '色', '成人'];
const t = document.title;
let i;
for (i = 0; i < blackWord.length; i++) {
if (t.match(blackWord[i])) {
addList(host, 1);
break;
}
}
function addList(host, status) {
const list = GM_getValue('list', {});
list[host] = status;
GM_setValue('list', list);
if (status) document.title = '';
}
}());