-
Notifications
You must be signed in to change notification settings - Fork 211
/
surge_contentFarm.js
39 lines (34 loc) · 1.54 KB
/
surge_contentFarm.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
/*
let reg = '<head>';
let str = '<head>\
<link rel="stylesheet" href="https://limbopro.com/CSS/Adblock4limbo.user.css" type="text/css" />\
<script type="text/javascript" async="async" src="https://limbopro.com/Adguard/Adblock4limbo.user.js"></script>'
let body = $response.body.replace(reg, str)
let headers = $response.headers;
headers['Content-Security-Policy'] = '';
$done({ headers, body })
*/
let url = $request.url;
if (url.indexOf("missav") != -1) {
let window_open_reg = 'window.open';
let window_open_str = '';
let reg = '<head>';
let str = '<head>\
<meta http-equiv="Content-Security-Policy" content="*">\
<link rel="stylesheet" href="https://limbopro.com/CSS/Adblock4limbo.user.css" type="text/css" />\
<script type="text/javascript" async="async" src="https://limbopro.com/Adguard/Adblock4limbo.user.js"></script>'
let body = $response.body.replace(reg, str).replace(window_open_reg, window_open_str);
let headers = $response.headers;
headers['Content-Security-Policy'] = "*";
$done({ headers, body, url })
} else {
let reg = '<head>';
let str = '<head>\
<meta http-equiv="Content-Security-Policy" content="*">\
<link rel="stylesheet" href="https://limbopro.com/CSS/Adblock4limbo.user.css" type="text/css" />\
<script type="text/javascript" async="async" src="https://limbopro.com/Adguard/Adblock4limbo.user.js"></script>'
let body = $response.body.replace(reg, str);
let headers = $response.headers;
headers['Content-Security-Policy'] = '*';
$done({ headers, body, url })
}