forked from jpcnmm/Scripting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemrise.vip.js
More file actions
18 lines (15 loc) · 438 Bytes
/
memrise.vip.js
File metadata and controls
18 lines (15 loc) · 438 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
let obj = JSON.parse($response.body);
let url = $request.url;
const cons1 = "api.memrise.com/v1.16/me/";
const cons2 = "api.memrise.com/v1.16/dashboard/";
const cons3 = "leaderboards/following/";
if(url.indexOf(cons1) != -1) {
obj["profile"]["is_pro"] = true;
}
if(url.indexOf(cons2) != -1) {
obj["user"]["is_premium"] = true;
}
if(url.indexOf(cons3) != -1) {
obj["users"][0]["is_premium"] = true;
}
$done({body: JSON.stringify(obj)});