-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
95 lines (95 loc) · 8.34 KB
/
index.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html manifest=cache.manifest>
<meta charset=utf-8>
<title>SpeedTester</title>
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<meta name=viewport content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, minimal-ui">
<script>eval(unescape(escape('♶♡♲☠♡☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☢♣♡♮♶♡♳☢☩☬♢☽♡☮♧♥♴♃♯♮♴♥♸♴☨☢☲♤☢☩☬♣☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☢♬♩♮♫☢☩☬♤☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☢♬♩♮♫☢☩☻♡☮♷♩♤♴♨☽☲☰☰☻♡☮♨♥♩♧♨♴☽☲☰☰☻♢☮♦♩♬♬♓♴♹♬♥☽☢☣♥♥♥☢☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♭♯♶♥♔♯☨☱☰☬☰☩☻♢☮♬♩♮♥♔♯☨☱☹☰☬☰☩☻♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☲☰☰☬☰☬☲☰☰☬☱☰☩☻♢☮♬♩♮♥♔♯☨☲☰☰☬☱☹☰☩☻♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☲☰☰☬☲☰☰☬☱☹☰☬☲☰☰☩☻♢☮♬♩♮♥♔♯☨☱☰☬☲☰☰☩☻♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☰☬☲☰☰☬☰☬☱☹☰☩☻♢☮♬♩♮♥♔♯☨☰☬☱☰☩☻♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☰☬☰☬☱☰☬☰☩☻♢☮♣♬♯♳♥♐♡♴♨☨☩☻♢☮♦♩♬♬☨☩☻♢☮♦♩♬♬♓♴♹♬♥☽☢♷♨♩♴♥☢☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♭♯♶♥♔♯☨☲☰☰☬☳☰☩☻♢☮♬♩♮♥♔♯☨☳☵☬☳☰☩☻☠♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☳☰☬☳☰☬☳☰☬☳☵☩☻♢☮♬♩♮♥♔♯☨☳☰☬☱☶☵☩☻♢☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☳☰☬☱☷☰☬☳☵☬☱☷☰☩☻♢☮♬♩♮♥♔♯☨☲☰☰☬☱☷☰☩☻♢☮♳♴♲♯♫♥♓♴♹♬♥☽☢☣☰♣♦☢☻♢☮♬♩♮♥♗♩♤♴♨☽☢☱☰☢☻♢☮♳♴♲♯♫♥☨☩☻♢☮♣♬♯♳♥♐♡♴♨☨☩☻♢☮♦♩♬♬☨☩☻♢☮♦♩♬♬♓♴♹♬♥☽☢☣☷☷☷☢☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♡♲♣☨☷☵☬☸☰☬☷☬☱☰☬☱☬☲☬☲☪♍♡♴♨☮♐♉☩☻♢☮♣♬♯♳♥♐♡♴♨☨☩☻♢☮♦♩♬♬☨☩☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♡♲♣☨☷☵☬☱☲☰☬☷☬☱☰☬☱☬☲☬☲☪♍♡♴♨☮♐♉☩☻♢☮♣♬♯♳♥♐♡♴♨☨☩☻♢☮♦♩♬♬☨☩☻♢☮♬♩♮♥♗♩♤♴♨☽☢☷☢☻♢☮♳♴♲♯♫♥♓♴♹♬♥☽☢☣☷☷☷☢☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♬♩♮♥♔♯☨☱☲☵☬☵☰☩☻♢☮♬♩♮♥♔♯☨☱☰☰☬☱☵☰☩☻♢☮♣♬♯♳♥♐♡♴♨☨☩☻♢☮♳♴♲♯♫♥☨☩☻♢☮♢♥♧♩♮♐♡♴♨☨☩☻♢☮♭♯♶♥♔♯☨☱☵☵☬☵☰☩☻♢☮♬♩♮♥♔♯☨☱☳☰☬☱☵☰☩☻♢☮♳♴♲♯♫♥☨☩☻☠♣☮♴♹♰♥☽☢♩♭♡♧♥☯♸☭♩♣♯♮☢☻♣☮♲♥♬☽☢♳♨♯♲♴♣♵♴☠♩♣♯♮☢☻♤☮♲♥♬☽☢♡♰♰♬♥☭♴♯♵♣♨☭♩♣♯♮☢☻♣☮♨♲♥♦☽♤☮♨♲♥♦☽♡☮♴♯♄♡♴♡♕♒♌☨☢♩♭♡♧♥☯♰♮♧☢☩☻♤♯♣♵♭♥♮♴☮♨♥♡♤☮♡♰♰♥♮♤♃♨♩♬♤☨♣☩☻♤♯♣♵♭♥♮♴☮♨♥♡♤☮♡♰♰♥♮♤♃♨♩♬♤☨♤☩☻').replace(/u../g,'')))</script>
<style>
* { box-sizing: border-box; -moz-box-sizing: border-box; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: auto; font-family: 'Source Sans Pro', sans-serif; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; cursor: default; }
html { font-size: 10pt; background: #ccc; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 15px 15px 0 15px; }
iframe { overflow: auto; resize: horizontal; height: auto; width: auto; margin: 15px 0 0 0; border: 1px solid rgba(0,0,0,.3); box-shadow: rgba(0,0,0,.1) 0 5px 15px; background: #fff; }
span { position: absolute; right: 15px; padding: .25em 0 0 0; font-size: 125%; font-weight: lighter; opacity: .7; transition: opacity .1s ease-in-out; }
span:hover,
span:focus { opacity: 1; }
input[type='url'], input[type='submit'], input[type='button'] { appearance: none; -webkit-appearance: none; padding: .25em .6em; margin: 0; background: #eaeaea; border: 1px solid #ccc; border-radius: .2em; color: #333; font-size: 120%; font-weight: bold; box-shadow: rgba(0,0,0,.2) 0 1px 2px; transition: all .2 ease-in-out; cursor: pointer; outline: none; text-decoration: none; -webkit-user-select: auto; -moz-user-select: auto; -ms-user-select: auto; -o-user-select: auto; user-select: default; cursor: pointer; }
input + input { margin-left: .25em !important; }
input:focus, input:hover { background: #fff; border-color: #eee; }
input[type='url'] { font-weight: normal; background: #fff; min-width: 220px; cursor: text; }
input[type='url']:focus,
input[type='url']:hover { border-color: #9cf; }
input[type='button']:active { background: #ccc; border-color: #aaa; box-shadow: rgba(0,0,0,.2) 0 0 0; }
@media (max-width: 700px) {
input[type='url'] { display: block; width: calc(100% - 140px); min-width: 0; float: left; }
input[type='submit'] { margin-right: 70px; }
input[type='button'] { margin-top: .5em; }
input:nth-child(4) { margin-left: 0 !important; }
}
@media (max-width: 500px) {
input[type='url'] { min-width: 0; }
input[type='button']:nth-child(n+4) { margin: .5em 0 0 0 !important; width: 10%; border-radius: 0; float: left; padding: .25em 0; }
input[type='button']:nth-of-type(3){border-top-left-radius:.2em; border-bottom-left-radius:.2em;}
input[type='button']:last-of-type{border-top-right-radius:.2em; border-bottom-right-radius:.2em;}
nav:after { content: ''; display: block; clear: both; }
}
</style>
<nav>
<span></span>
<input type=url placeholder=http:// value=http:// tabindex=1 autocapitalize=off autofocus>
<input type=submit value=Go onclick=loadURL()>
<input type=button value=1 onclick=resizeIframe('100px')>
<input type=button value=2 onclick=resizeIframe('200px')>
<input type=button value=3 onclick=resizeIframe('300px')>
<input type=button value=4 onclick=resizeIframe('400px')>
<input type=button value=5 onclick=resizeIframe('500px')>
<input type=button value=6 onclick=resizeIframe('600px')>
<input type=button value=7 onclick=resizeIframe('700px')>
<input type=button value=8 onclick=resizeIframe('800px')>
<input type=button value=9 onclick=resizeIframe('900px')>
<input type=button value=∞ onclick=resizeIframe('100%')>
</nav>
<iframe></iframe>
<script>
var nav = document.querySelector('nav'),
url = document.querySelector('[type=url]'),
iframe = document.querySelector('iframe'),
load = window.location.search.substring(1),
span = document.querySelector('span')
document.addEventListener('DOMContentLoaded',function(){
iframe.style.width = '100%'
autoHeight()
if (load){
url.value = load
loadURL()
}
})
window.addEventListener('resize',autoHeight)
span.addEventListener('click',autoHeight)
document.addEventListener('keypress',function(e){
e = e || window.event
var charCode = (typeof e.which=='number')?e.which:e.keyCode;
if (url !== document.activeElement){
(charCode>=48 && charCode<=58) && resizeIframe(String.fromCharCode(charCode)+'00px') // keys 1-9 resize the iframe
charCode==48 && resizeIframe('100%') // 0 key resizes the iframe
charCode==13 && loadURL() // enter key loads url
}
})
function autoHeight(){
iframe.style.height = window.innerHeight-nav.offsetHeight-45+'px'
updateOutput()
}
function resizeIframe(width){
iframe.style.width = width
updateOutput()
}
function loadURL(){
iframe.setAttribute('src',url.value)
url.blur()
updateOutput()
}
function updateOutput(){
span.innerHTML = iframe.offsetWidth+' x '+iframe.offsetHeight
}
</script>