-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebtop_test.html
More file actions
105 lines (80 loc) · 2.3 KB
/
Copy pathwebtop_test.html
File metadata and controls
105 lines (80 loc) · 2.3 KB
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
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset="utf-8"/>
<style type="text/css">
frame.browser {
background-color: #86BAE4;
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
}
canvas.waterfall {
background-color: #86BAE4;
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
}
canvas.clock {
background-color: #B6ECDC;
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
}
</style>
<script src='require.js'></script>
<script>
// Test for example url = http://foo.com/webtop_test.html?mobile
//
// where 'mobile' is the argument to this script
//
let webtop_type = location.href.replace(/^.*\?/g, '');
console.log('webtop_type=' + webtop_type);
if(webtop_type === 'mobile')
webtop_type = 'webtop_mobile.js'
else if(webtop_type === 'desktop')
webtop_type = 'webtop_desktop.js'
else
// This will auto select between 'webtop_mobile.js' and
// 'webtop_desktop.js' depending on browser.
webtop_type = 'webtop.js';
require(webtop_type);
require('clock.js');
onload = function() {
function Page(url) {
var iframe = document.createElement('iframe');
iframe.src = url;
new WTApp('Page: ' + url, iframe);
}
var clock = new Clock;
new WTApp('Clock', clock.getElement());
clock.run();
Page('https://www.youtube.com/embed/I_aRJFsaxKI');
Page('.');
};
</script>
<title>Webtop Example</title>
</head>
<body>
<h5><a href="..">parent directory</a> <a href=".">current
directory</a> <a href="index.html">index page</a></h5>
<h1>Webtop</h1>
<p>This is a simple web based desktop that
uses just one client side javaScript,
and CSS file, with an HTML file like this one.
You can put regular HTML content under the "app" windows,
like you see here.</p>
<p>Other Web Desktops at <a
href="https://en.wikipedia.org/wiki/Web_desktop"
>https://en.wikipedia.org/wiki/Web_desktop</a>.</p>
<p>You can get the source to this web desktop project at on
github at <a
href="https://github.com/vtwireless/webtop"
>https://github.com/vtwireless/webtop</a>.</p>
<h5><a href="..">parent directory</a> <a href=".">current
directory</a> <a href="index.html">index page</a></h5>
</body>
</html>