-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplurk R18 遮蔽.user.js
43 lines (39 loc) · 1.6 KB
/
plurk R18 遮蔽.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
// ==UserScript==
// @name plurk R18 遮蔽
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 在自家主頁上新增一個 R18 打碼的按扭來遮蔽成人內容 (防止同事、同學、老闆經過
// @author S.Dot, ThanatosDi
// @match https://www.plurk.com/*
// @homepage https://github.com/SentenceDot
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
(function() {
'use strict';
var filter_switch = false;
// Your code here...
$("#updater").append('<div id="filter" class="item" style=""><a><i class="pif-message-new"></i><span id="noti_np_text">R18 遮蔽</span><span id="filter_message" class="unread_generic">OFF</span></a></div>');
$("#filter").click(()=>{
filter_switch = !filter_switch;
console.log('click')
console.log(filter_switch)
if(filter_switch){
$("#filter_message").text("ON");
$("._lc_ .plurk.porn .plurk_cnt .td_cnt ").css({"filter":" blur(4px)"});
$("._lc_ .plurk.porn .plurk_cnt .td_cnt").hover(function () {
$(this).css({"filter":"none"});
}, function(){
$(this).css({"filter":" blur(4px)"});
})
}
else{
$("#filter_message").text("OFF");
$("._lc_ .plurk.porn .plurk_cnt .td_cnt ").css({"filter":""});
$("._lc_ .plurk.porn .plurk_cnt .td_cnt").hover(function () {
$(this).css({"filter":""});
}, function(){
$(this).css({"filter":""});
})
}
})
})();