-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
38 lines (37 loc) · 1006 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>Screen Flipper</title>
<script>
// this little javascript snippet will parse any incoming URL
// parameters and place them in the window.urlParams object
window.urlParams = window.location.search.split(/[?&]/).slice(1).map(function(paramPair) {
return paramPair.split(/=(.+)?/).slice(0, 2);
}).reduce(function (obj, pairArray) {
obj[pairArray[0]] = pairArray[1];
return obj;
}, {});
</script>
<style>
* {
padding: 0;
margin: 0;
}
img {
transform: rotate(180deg);
}
</style>
</head>
<body>
<img id="screen" />
</body>
<script>
var img = document.getElementById("screen");
var url = unescape(decodeURIComponent(window.urlParams.screenshot));
img.src = url;
if ( typeof(window.urlParams.width) !== "undefined" ) {
img.width = window.urlParams.width;
img.height = window.urlParams.height;
}
</script>
</html>