-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
150 lines (130 loc) · 6.37 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html class="wf-donegalone-n4-active wf-gloriahallelujah-n4-active wf-permanentmarker-n4-active wf-mysteryquest-n4-active wf-active">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width-device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
<meta property="og:title" content="Adventure of Roy-themed 2048?! WHAT?!" />
<title>The Adventure of Roy</title>
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Donegal+One%7CGloria+Hallelujah%7CPermanent+Marker%7CMystery+Quest&subset=latin,latin,latin,latin" media="all">
<style type="text/css"></style>
</head>
<body>
<div class="player" style="left: 0px; top: 231.375px;">
<div style="position: absolute; overflow: hidden; width: 147px; height: 110px; font-size: 0.30625px; -webkit-user-select: none; transform: translateZ(0px); background: rgb(255, 255, 255);">
<canvas width="147" height="110" style="position: absolute; width: 147px; height: 110px;">
<canvas width="793" height="595" style="position: absolute; width: 147px; height: 110px;">
<canvas width="147" height="110" tabindex="0" style="outline: none; position: absolute; width: 147px; height: 110px;">
<div style="position: absolute; right: 14em; left: 14em; bottom: 6em; padding: 5em 30em 5em 5em; border: 3em solid rgb(46, 174, 223); border-radius: 8em; display: none; background: rgb(255, 255, 255);">
<div style="cursor: default; font-style: normal; font-variant: normal; font-weight: bold; font-stretch: normal; font-size: 13em; line-height: normal; font-family: sans-serif; margin: 0px -1.92308em 0.384615em 0px; white-space: pre; overflow: hidden; text-overflow: ellipsis;">
<input style="border: 0px; box-sizing: border-box; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 13em; line-height: normal; font-family: sans-serif; padding: 0px 0.230769em; outline: 0px; margin: 0px; width: 100%; height: 1.53846em; display: block; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0.0769231em 0.0769231em 0.153846em inset, rgba(255, 255, 255, 0.2) -0.0769231em -0.0769231em 0.0769231em inset; -webkit-appearance: none; background: rgb(238, 238, 238);">
<div style="width: 22em; height: 22em; position: absolute; right: 4em; bottom: 4em; background: url("icons.svg") -165em -37em / 320em 96em;"></div>
</div>
</div>
</div>
<div class="splash" style="display: none;">
<div>
<h1>Loading...</h1>
<div class="progress-bar" style="width: 100%;"></div>
</div>
</div>
</div>
<div class="error">
<div>
<h1>phosphorus</h1>
<p>"An error has occurred. "
<a id="bug-link" href="https://github.com/nathan/phosphorus/issues/new">Click here</a>
" to file a bug report."
</p>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" type="text/javascript" async></script>
<script src="fonts.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.js"></script>
<script src="//canvg.googlecode.com/svn/trunk/rgbcolor.js"></script>
<script src="//canvg.googlecode.com/svn/trunk/StackBlur.js"></script>
<script src="//canvg.googlecode.com/svn/trunk/canvg.js"></script>
<script src="phosphorus.js"></script>
<script>
(function () {
'use strict';
if (location.protocol === 'https:') {
location.replace(('' + location).replace(/^https:/, 'http:'));
}
var stage;
var projectId = 16007998;
var projectTitle = '';
var turbo = false;
var fullScreen = true;
var params = location.search.substr(1).split('&');
params.forEach(function(p) {
var parts = p.split('=');
if (parts.length > 1) {
switch (parts[0]) {
case 'id':
projectId = Number(parts[1]);
break;
case 'turbo':
turbo = parts[1] !== 'false';
break;
case 'full-screen':
fullScreen = parts[1] !== 'false';
break;
}
}
});
var splash = document.querySelector('.splash');
var progressBar = document.querySelector('.progress-bar');
var error = document.querySelector('.error');
var bugLink = document.querySelector('#bug-link');
var player = document.querySelector('.player');
var stage;
function layout() {
if (!stage) return;
var w = Math.min(window.innerWidth, window.innerHeight / .75);
if (!fullScreen) w = Math.min(w, 480);
var h = w * .75;
player.style.left = (window.innerWidth - w) / 2 + 'px';
player.style.top = (window.innerHeight - h) / 2 + 'px';
stage.setZoom(w / 480);
stage.draw();
}
function showError(e) {
error.style.display = 'table';
bugLink.href = 'https://github.com/nathan/phosphorus/issues/new?title=' + encodeURIComponent(projectTitle || '') + '&body=' + encodeURIComponent('\n\n\nhttp://scratch.mit.edu/projects/' + projectId + '\nhttp://phosphorus.github.io/#' + projectId + (e.stack ? '\n\n```\n' + e.stack + '\n```' : ''));
console.error(e.stack);
}
window.addEventListener('resize', layout);
if (P.hasTouchEvents) {
document.addEventListener('touchmove', function(e) {
e.preventDefault();
});
}
var request = P.IO.loadScratchr2Project(projectId);
request.onload = function (s) {
splash.style.display = 'none';
stage = s;
layout();
s.isTurbo = turbo;
s.start();
s.triggerGreenFlag();
player.appendChild(s.root);
s.focus();
s.handleError = showError;
};
request.onerror = showError;
request.onprogress = function (e) {
progressBar.style.width = (10 + e.loaded / e.total * 90) + '%';
};
P.IO.loadScratchr2ProjectTitle(projectId, function(title) {
document.title = projectTitle = title;
});
}());
</script>
</body>
</html>