-
Notifications
You must be signed in to change notification settings - Fork 1
/
title_video_popup.html
518 lines (474 loc) · 16.9 KB
/
title_video_popup.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<!doctype html>
<html>
<head> <!-- Start Wayback Rewrite JS Include --> <!-- wbgrp-svc080.us.archive.org -->
<script type="text/javascript" src="wb-static/js/ait-client-rewrite.js"></script>
<script type="text/javascript">
WB_wombat_Init("https://wayback.archive-it.org/all/", "20110117213252", "www.runescape.com");
</script>
<script type="text/javascript" src="static/AIT_Analytics.js" async></script> <!-- End Wayback Rewrite JS Include -->
<link href="css/rs2010/global-2.css" rel="stylesheet">
<link href="css/rs2010/oldmenu-5.css" rel="stylesheet">
<script type="text/javascript" src="jagex.com/js/jquery/jquery_1_4_2.js"></script>
<script type="text/javascript" src="jagex.com/js/jquery/jquery_placeholder_0_9.js"></script>
<script src="css/rs2010/globaljs-1.js"></script>
<title>RuneScape - MMORPG - The No.1 Free Online Multiplayer Game</title>
<meta name="keywords" content="MMORPG, free RPG games online, online multiplayer, role-playing, massively multiplayer games, mmo, RuneScape, Jagex, java">
<meta name="description" content="Play RuneScape for free, and join a global community of millions as you complete quests and win enormous treasures in a 3D world full of magic and monsters.">
<link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico">
<link rel="SHORTCUT ICON" href="favicon.ico">
<link rel="apple-touch-icon" href="img/mobile.png">
<style type="text/css">
html,
body,
object,
embed {
margin: 0 auto;
padding: 0;
width: 640px;
height: 400px;
min-width: 640px;
min-height: 400px;
background: black;
overflow: hidden;
}
object,
embed {
display: block;
width: 640px;
height: 400px;
margin: 0 auto;
}
p {
margin: 0;
padding: 2em;
font: bold 16px/20px arial, helvetica, freesans, sans-serif;
text-align: center;
color: #ccc;
}
p a {
color: white;
text-decoration: underline;
}
p a:hover {
text-decoration: none;
}
</style>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body> <!--
FILE ARCHIVED ON 21:32:52 Jan 17, 2011 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 13:00:49 Feb 22, 2021.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
urlKey=com,runescape)/title_video_popup.ws
resultUrl=title_video_popup.html
result.getCaptureTimestamp()=20110117213252
--> <!-- media player modal -->
<style>
#wm-media-curtain {
display: none !important;
width: 100vw !important;
height: 100vh !important;
grid-template-columns: 5% 90% 5%;
z-index: 2000000001 !important;
background-color: #000000f7 !important;
line-height:normal !important;
padding: 0 !important;
color: #000 !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
font-size: medium !important;
font-family: sans-serif !important;
font-weight: normal !important;
}
#wm-media-prev, #wm-media-next {
align-self: center !important;
justify-self: center !important;
color: #fff !important;
font-size: 3rem !important;
opacity: 0.3 !important;
}
#wm-media-prev {
grid-column: 1 !important;
grid-row: 1 / 3 !important;
cursor: pointer !important;
}
#wm-media-next {
grid-column: 3 !important;
grid-row: 1 / 3 !important;
cursor: pointer !important;
}
#wm-media-close-button {
align-self: start !important;
justify-self: center !important;
color: #fff !important;
font-size: 3rem !important;
opacity: 0.3 !important;
grid-column: 3 !important;
grid-row: 1 !important;
cursor: pointer !important;
}
#wm-media-close-button:hover, #wm-media-close-button:active,
#wm-media-close-button:focus, #wm-media-prev:hover,
#wm-media-prev:active, #wm-media-prev:focus, #wm-media-next:hover,
#wm-media-next:active, #wm-media-next:focus {
opacity: 0.9 !important;
}
#wm-media-player-container {
align-self: center !important;
justify-self: center !important;
color: #fff !important;
grid-row: 1 / 3 !important;
grid-column: 2 !important;
}
#wm-media-player {
}
#wm-media-page-number {
align-self: end !important;
justify-self: center !important;
color: #fff !important;
grid-row: 2 !important;
grid-column: 2 !important;
padding-bottom: 3vh !important;
}
#wm-media-title, #wm-media-description {
/* width: 50vw !important; */
margin: 1em auto !important;
}
#wm-media-title {
font-weight: bold !important;
}
</style>
<div id="wm-media-curtain">
<div id="wm-media-prev" onclick="__wmMediaPrev()">
<
</div>
<div id="wm-media-player-container">
<div id="wm-media-title">
</div>
<div id="wm-media-player">
</div>
<div id="wm-media-description">
</div>
</div>
<div id="wm-media-page-number">
</div>
<div id="wm-media-close-button" onclick="document.getElementById('wm-media-curtain').style.setProperty('display', 'none', 'important')">
×
</div>
<div id="wm-media-next" onclick="__wmMediaNext()">
>
</div>
</div>
<script type="text/javascript" src="wb-static/js/timeshift.js"></script>
<script type="text/javascript">
//TimeShift.setTime(1295299972000);
//Date = TimeShift.Date;
</script>
<script type="text/javascript">
//<![CDATA[
//lazily loading AIT metadata link generation script
var lazyLoader = function(evt)
{
document.getElementById('lazyScript').src = 'https://partner.archive-it.org/metadata_link/2252/http%3A%2F%2Fwww.runescape.com%2Ftitle_video_popup.ws';
};
//ie8 and below do not support addEventListener
if (navigator.appName.indexOf('MSIE 7') > 0){
//alert("msie");
}
if (window.addEventListener){
window.addEventListener("load", lazyLoader, true);
} else if (window.attachEvent){
window.attachEvent("onload", lazyLoader);
}
//]]>
</script>
<script type="text/javascript" src="wb-static/js/disclaim-element.js"></script>
<script type="text/javascript">
var disclaimBanner = document.getElementById("wm-disclaim");
if(disclaimBanner != null) {
disclaimElement(disclaimBanner);
}
</script>
<script>
//fix up banner in case it is moved down by replayed JS - for https://webarchive.jira.com/browse/ARI-3982
function fixUpWBBanner() {
var wb_banner = document.getElementById("wm-disclaim");
if (wb_banner) {
if (document.body.firstChild !== wb_banner) {
document.body.insertBefore(wb_banner, document.body.firstChild);
}
}
}
setInterval(fixUpWBBanner, 2000);
</script>
<script>
var __wmAllMedia = [];
var __wmArchivedMedia = [];
var __wmPlayerIndex = -1;
function __wmMediaNext() {
if (__wmPlayerIndex + 1 < __wmArchivedMedia.length) {
__wmPlayerIndex++;
__wmUpdateTheaterState();
}
}
function __wmMediaPrev() {
if (__wmPlayerIndex > 0) {
__wmPlayerIndex--;
__wmUpdateTheaterState();
}
}
function __wmUpdateTheaterState() {
var activeMedia = __wmArchivedMedia[__wmPlayerIndex];
if (activeMedia.title) {
document.getElementById("wm-media-title").textContent = activeMedia.title;
}
if (activeMedia.description) {
document.getElementById("wm-media-description").textContent = activeMedia.description;
}
document.getElementById("wm-media-page-number").textContent =
(__wmPlayerIndex + 1) + " of " + __wmArchivedMedia.length;
var newPlayerE;
if (activeMedia.isAudio) {
newPlayerE = document.createElement("audio");
} else {
newPlayerE = document.createElement("video");
if (activeMedia.wbThumb) {
newPlayerE.setAttribute("poster", activeMedia.wbThumb);
}
newPlayerE.addEventListener("loadeddata", function(e) {
document.getElementById("wm-media-title").style.setProperty("width", newPlayerE.videoWidth + "px", "important");
document.getElementById("wm-media-description").style.setProperty("width", newPlayerE.videoWidth + "px", "important");
});
}
newPlayerE.id = "wm-media-player";
newPlayerE.setAttribute("controls", "true");
var oldPlayerE = document.getElementById("wm-media-player");
newPlayerE.addEventListener("error", function(e) {
if (newPlayerE.error) { // sometimes this event fires for no reason???
var errorE = document.createElement("div");
errorE.id = "wm-media-player";
errorE.textContent = "Failed to load media (it may not have been captured). ";
var linkE = document.createElement("a");
linkE.setAttribute("href", activeMedia.wbUrl);
linkE.textContent = "Details";
errorE.appendChild(linkE);
var oldPlayerE = document.getElementById("wm-media-player");
oldPlayerE.parentElement.replaceChild(errorE, oldPlayerE);
}
});
newPlayerE.src = activeMedia.wbUrl;
var oldPlayerE = document.getElementById("wm-media-player");
oldPlayerE.parentElement.replaceChild(newPlayerE, oldPlayerE);
if (__wmPlayerIndex > 0) {
document.getElementById("wm-media-prev").style.setProperty("display", "initial", "important");
} else {
document.getElementById("wm-media-prev").style.setProperty("display", "none", "important");
}
if (__wmPlayerIndex + 1 < __wmArchivedMedia.length) {
document.getElementById("wm-media-next").style.setProperty("display", "initial", "important");
} else {
document.getElementById("wm-media-next").style.setProperty("display", "none", "important");
}
}
(function() {
var mediaInfoLoaded = false;
var mediaPlaced = false;
var pageUrl = 'title_video_popup.html';
var ydlJsonUrl = '//wayback.archive-it.org/all/20110117213252/youtube-dl:http://www.runescape.com/title_video_popup.ws';
var totalAudio;
var totalVideo;
var archivedAudio;
var archivedVideo;
function countEndingDots(s) {
var i = s.length - 1;
var count = 0;
while (i >= 0 && s[i] == '.') {
count += 1;
i -= 1;
}
return count;
}
function updateButtonWhileLoading() {
var oldText = document.getElementById('wm-media-button').textContent;
var oldDots = countEndingDots(oldText);
var newText;
if (oldDots >= 3) {
newText = oldText.substring(0, oldText.length - oldDots);
} else {
newText = oldText + ".";
}
document.getElementById('wm-media-button').textContent = newText;
}
var buttonUpdater = setInterval(updateButtonWhileLoading, 500);
function finalizeButton() {
clearInterval(buttonUpdater);
// "Found 5 archived media items out of 5 total in page. Play Archived Media"
var text = "Found " + __wmArchivedMedia.length + " archived media "
+ (__wmArchivedMedia.length == 1 ? "item" : "items") + " out of "
+ __wmAllMedia.length + " total on this page. ";
var e = document.getElementById("wm-media-button");
e.textContent = text;
e.style.setProperty("color", "#000", "important");
if (__wmArchivedMedia && __wmArchivedMedia.length) {
var playE = document.createElement("span");
playE.textContent = "▶️";
playE.style.setProperty("cursor", "pointer", "important");
playE.addEventListener("click", function(e) {
document.getElementById("wm-media-curtain").style.setProperty("display", "grid", "important");
});
e.appendChild(playE);
}
}
function placeMediaOnPageIfReady(e) {
console.log(e.type + " document.readyState=" + document.readyState);
if (e.type === "mediaInfoLoaded") {
mediaInfoLoaded = true;
}
if (!mediaPlaced && mediaInfoLoaded && document.readyState === "complete") {
mediaPlaced = true;
if (__wmArchivedMedia && __wmArchivedMedia.length) {
placeMediaOnPage(__wmArchivedMedia)
}
}
}
document.addEventListener("mediaInfoLoaded", placeMediaOnPageIfReady);
document.addEventListener("readystatechange", placeMediaOnPageIfReady);
function prepareMedia() {
window.fetch(ydlJsonUrl)
.then(function(response) {
return response.json();
})
.catch(function(e) {
return null;
})
.then(function(ydlJson) {
if (ydlJson) {
__wmAllMedia = enumerateMedia(ydlJson);
}
return __wmAllMedia;
})
.then(function(allMedia) {
var allMediaPromises = [];
if (allMedia && allMedia.length) {
allMediaPromises = checkIfArchived(allMedia);
}
return allMediaPromises;
})
.then(function(allMedia) { // promises are resolved now
__wmAllMedia = allMedia;
if (allMedia && allMedia.length) {
__wmArchivedMedia = allMedia.filter(m => m.isArchived);
}
document.dispatchEvent(new Event("mediaInfoLoaded"));
return __wmArchivedMedia;
})
.then(function(archivedMedia) {
if (archivedMedia && archivedMedia.length) {
__wmPlayerIndex = 0;
__wmUpdateTheaterState();
}
return archivedMedia;
})
.then(function(archivedMedia) {
finalizeButton();
})
.catch(function(err) {
console.warn("error loading or setting up media stuff", err);
});
document.addEventListener('keydown', function(e) {
if (e.keyCode == 27) { // esc
document.getElementById('wm-media-curtain').style.setProperty('display', 'none', 'important');
} else if (e.keyCode == 37) { // left
__wmMediaPrev();
} else if (e.keyCode == 39) { // right
__wmMediaNext();
}
});
}
function enumerateMedia(ydlJson) {
var entries = ydlJson.entries || [ydlJson];
var media = [];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
var url = entry.url;
if (entry.protocol != "https" && entry.protocol != "http") {
var nnnnn = String(i + 1).padStart(5, "0");
url = "youtube-dl:" + nnnnn + ":" + pageUrl;
}
media.push({
liveUrl: url,
wbUrl: ydlJsonUrl.replace(/youtube-dl:.*/, url),
isAudio: entry.format && entry.format.includes("audio only"),
width: entry.width,
height: entry.height,
wbThumb: ydlJsonUrl.replace(/youtube-dl:.*/, entry.thumbnail),
title: entry.title,
description: entry.description
});
}
return media;
}
/* sets isArchived: true/false for each media element */
function checkIfArchived(media) {
var promises = [];
for (var i = 0; i < media.length; i++) {
var promise = (function(mediaItem) {
return window.fetch(mediaItem.wbUrl, {method: "HEAD"})
.then(function(response) {
mediaItem.isArchived = response.ok;
return mediaItem;
});
})(media[i]);
promises.push(promise);
}
var allPromise = Promise.all(promises); // wait for all to resolve
return allPromise;
}
function findElementsToReplace() {
var result = [];
var elements = document.querySelectorAll("audio,video,object,embed,iframe");
for (var i = 0; i < elements.length; i++) {
var e = elements[i];
if (e.id == "wm-media-player") {
continue; // don't replace lightbox player!
} else if (e.tagName == "IFRAME") {
if (e.src.indexOf("youtube.com/embed/") > 0 || e.src.indexOf("player.vimeo.com/video") > 0) {
result.push(e);
}
} else {
result.push(e);
}
}
return result;
}
function placeMediaOnPage(media) {
var elementsToReplace = findElementsToReplace();
for (var i = 0; i < elementsToReplace.length && i < media.length; i++) {
if (!media[i].isArchived)
continue;
var mediaE = document.createElement(!media[i].isAudio ? "video" : "audio");
mediaE.setAttribute("controls", "true");
// mediaE.setAttribute("style", "width: 100%; height: 100%");
mediaE.setAttribute("style", "width: 100%; height: auto");
mediaE.src = media[i].wbUrl;
elementsToReplace[i].parentElement.replaceChild(mediaE, elementsToReplace[i]);
}
}
prepareMedia();
})();
</script> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="img/main/home2010/banners/video/player.swf.html"> <param name="FlashVars" value="trailerPath=img/main/home2010/banners/video/King-of-the-Dwarves.flv&skinPath=http://www.img/main/home2010/banners/video/skin.swf.html"> <param name="wmode" value="opaque"> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="img/main/home2010/banners/video/player.swf.html"> <param name="FlashVars" value="trailerPath=img/main/home2010/banners/video/King-of-the-Dwarves.flv&skinPath=http://www.img/main/home2010/banners/video/skin.swf.html"> <param name="wmode" value="opaque"> <!--<![endif]--> <p>Sorry, you need <a href="http://www.macromedia.com/go/getflashplayer" target="_blank">Flash Player</a> to view this video.</p> <!--[if !IE]>--> </object> <!--[if !IE]>--><!--<![endif]--> </object> <!--
FILE ARCHIVED ON 21:32:52 Jan 17, 2011 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 13:00:49 Feb 22, 2021.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
-->
</body>
</html>