-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
29 lines (26 loc) · 912 Bytes
/
script.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
console.clear();
const url = "https://backend.deviantart.com/oembed?url=";
const input = document.getElementsByClassName("link");
function bypass() {
var uri = input[0].value;
var full_uri = url + uri;
var full_url = `https://api.allorigins.win/get?url=${encodeURIComponent(full_uri)}`;
fetch(full_url, {
referrerPolicy: "strict-origin-when-cross-origin",
body: null,
method: "GET",
mode: "cors",
credentials: "omit",
}).then(res => {
res.json().then(data => {
if (data.status.http_code === 404) {
alert("Invalid DeviantArt URL.");
input[0].value = "";
} else {
var obj = JSON.parse(data.contents);
document.getElementById("image").src = obj.url;
document.getElementById("h").textContent = "Bypassed";
}
});
});
}