forked from shenruisi/Stay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jianshu-content.js
43 lines (34 loc) · 1014 Bytes
/
jianshu-content.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
function removeChoosePanel(){
let pannel = document.querySelector('.download-app-guidance');
if (pannel){
pannel.remove();
return COMPLETE;
}
return CONTINUE;
}
function removeAppJump(){
let app = document.querySelector('button.call-app-btn');
if (app){
app.remove();
return COMPLETE;
}
return CONTINUE;
}
function unfold(){
let closebtn = document.querySelector('button.close-collapse-btn');
if (closebtn){
closebtn.remove();
let content = document.querySelector('div.collapse-free-content')
if (content){
content.className = null;
}
return COMPLETE;
}
return CONTINUE;
}
document.addEventListener("DOMContentLoaded", function(event) {
let tasks = [removeChoosePanel,removeAppJump,unfold];
Inject.run(tasks,100,30,false).then((data) => {
browser.runtime.sendMessage({from:"content",operate:"saveAppList",data:data})
});
});