-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlatest.js
35 lines (29 loc) · 927 Bytes
/
latest.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
// unframed
var blocked = `
<link href="https://cdn.jsdelivr.net/gh/proudparrot2/cdn/fire.css" rel="stylesheet" type="text/css"/>
<style>
body {
transform: translate(-50%, -50%);
text-align: center;
position: absolute;
top: 50%;
left: 50%;
}
h1 { font-size: 25px;}
.btn { width: 75%; font-weight: bold; font-size: 13px; margin: 5px;}
</style>
<h1>This embed was blocked by Unframed</h1> <br>
<button class="btn btn-secondary" onclick="UnframedRedirect()">Go to original page</button>
<button class="btn btn-secondary" onclick="UnframedLearnmore()">Learn more</button>
`
if (window.self != window.top) {
if (!document.referrer.includes(self.location)) {
document.querySelector("html").innerHTML = blocked
}
}
function UnframedRedirect() {
open(self.location)
}
function UnframedLearnmore() {
open("https://unframed.netlify.app/faq.html")
}