-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.html
executable file
·214 lines (169 loc) · 7.08 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="description"
content="Buddy Pond - Cloud OS and Instant Messenger all wrapped up in one delightfully fun to use App. We are making the Internet Fun Again." />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://buddypond.com">
<meta name="twitter:site" content="@marak">
<meta name="twitter:creator" content="@marak">
<meta name="twitter:title" content="Buddy Pond Cloud OS and Instant Messenger">
<meta name="twitter:description"
content="Buddy Pond is a Cloud OS and Instant Messenger all wrapped up in one delightfully fun to use App. We are making the Internet Fun Again.">
<meta name="twitter:image"
content="https://github.com/Marak/buddypond-assets/raw/master/promo/buddypond-demo-april-2022.gif">
<title>Buddy Pond</title>
<!--[if lt IE 7]>
<script>
window.top.location = 'ie.html';
</script>
<![endif]-->
<!-- <script type="text/javascript" src="/v4-to-v5-bridge.js"></script> -->
<script type="text/javascript" src="/v5.js"></script>
<script type="text/javascript">
// certain websites are currently not supported as referrer
let notCurrentlySupportedSites = [/*'example.com', 'website.com'*/];
notCurrentlySupportedSites.forEach(function (site) {
if (document.referrer.search(site) !== -1) {
alert(site + ' is currently not supported by Buddy Pond. \n\n Please check out our Github or try again later.')
document.location = 'https://duckduckgo.com/?q=happy+puppies&t=opera&iax=images&ia=images'
}
});
</script>
<link rel="stylesheet" href="desktop/assets/css/reset.css">
<link rel="stylesheet" href="desktop/assets/css/loader.css">
<!--[if lt IE 9]>
<link rel="stylesheet" href="desktop/assets/css/ie.css" />
<![endif]-->
</head>
<body>
<img id="wallpaper" class="abs wallpaper" src="" />
<div id="loaderHolder">
<div id="loader"></div>
</div>
<!--
<div class="importantConfirmationsScreen">
<div class="confirmationForm">
CONFIRM
<form>
<button>Purchase GBP</button>
</form>
</div>
</div>
-->
<!-- src="desktop/assets/images/gui/rainbow-hexagon-lattice.gif" -->
<!-- TODO: remove? -->
<div id="mainOverlay" class="has-droparea">
<img class="mobileLoadingOverlay" />
<div class="abs" id="wrapper">
<div class="abs" id="desktop">
<!-- default desktop icons are currently rendered in `app.settings.load()` -->
<canvas class="canvasBackground" id="c"></canvas>
</div>
</div>
<!-- -->
<link rel="stylesheet" href="desktop/assets/css/desktop.css" />
<!-- <link rel="stylesheet" href="desktop/assets/css/mobile.css" /> -->
<script src="/desktop/assets/js/jquery.js"></script>
<!-- ><script src="desktop/assets/js/jquery.ripples.js"></script> -->
<!-- <script src="/v5/router.js"></script> -->
<script src="/v5/vendor/flexHide.js"></script>
<!-- jQuery UI can be replaced when legacy autocomplete and Windows are fully replaced -->
<link rel="stylesheet" href="/desktop/assets/css/jquery.ui.css">
<script src="/desktop/assets/js/jquery.ui.js"></script><!-- -->
<script src="/desktop/assets/js/jquery.dateformat.js"></script>
<!-- TODO: remove all the below files with replaced v5 code-->
<script src="/desktop/assets/js/forbidden.notes.js"></script>
<!-- SDK should be able to be removed -->
<script src="/v5/apps/based/client/lib/api.js"></script>
<script>
let _host = 'https://buddypond.com';
let _api = 'https://api.buddypond.com';
let _wsHost = 'wss://api.buddypond.com';
let _cdn = 'https://files.buddypond.com';
//_host = 'https://192.168.200.59';
// _api = 'https://192.168.200.59';
// _wsHost = 'wss://192.168.200.59';
// _host = 'https://localhost'
// _api = 'https://buddylist.buddypond.com';
_api = 'https://a.buddypond.com';
//_api = 'https://192.168.200.59:8787';
buddypond.host = _host;
buddypond.endpoint = _api + '/api/v6';
let renderBpApp = true;
// route the SPA based on the current path
// any routes that land here outside of root will be proxied to files.buddypond.com ( user pads )
let currentPath = window.location.pathname;
// document.write currentPath
// alert(`currentPath: ${currentPath}`);
if (currentPath !== '/') {
renderBpApp = false;
console.log('currentPath', currentPath);
}
bindJqueryReady();
function bindJqueryReady() {
// see: ReadMe.md for documentation on `desktop.use`
$(document).ready(function () {
// alert(renderBpApp)
if (!renderBpApp) {
// render the app
// renderApp();
// empty the body
// now we need to fetch the pad and render it
$('body').empty();
// write the buddypad iframe
let buddypadIframe = document.createElement('iframe');
// set height and width
//buddypadIframe.style.width = document.documentElement.clientWidth + 'px';
//buddypadIframe.style.height = document.documentElement.clientHeight + 'px';
buddypadIframe.style.width = '100%';
buddypadIframe.style.height = '800px';
// set the id
buddypadIframe.id = 'buddypad';
$('body').append(buddypadIframe);
// remove padding and margin from body
$('body').css('padding', '0');
$('body').css('margin', '0');
// remove border from iframe and body
$('#buddypad').css('border', 'none');
$('body').css('border', 'none');
// set the src of the buddypad to the current path
let filesSrc = 'https://files.buddypond.com' + currentPath;
console.log('setting src to', filesSrc);
$('#buddypad').attr('src', filesSrc);
return;
}
bp_v_5();
let documentReadyTime = new Date();
// desktop.log('Buddy Pond Cloud OS Initialized');
// desktop.log('Now loading apps');
let now = new Date();
// For Buddy Experience we'll add some fades and delays
let fadeInDelay = 555;
// If the page has taken over 3.333 seconds to load...
// ...reduce the fade in delay ( since the Buddy has waited long enough )
if (now.getTime() - documentReadyTime.getTime() > 3333) {
fadeInDelay = 111;
}
$('#loaderHolder').fadeOut({
easing: 'linear',
duration: fadeInDelay,
complete: function () {
$('#mainOverlay').fadeIn({
easing: 'linear',
duration: 333
});
}
});
});
}
</script>
<div id="shadowRender">
</div>
<iframe id="buddypad"></iframe>
<script type="module" src="/v5/public/buddypond.umd.js"></script>
</body>
</html>