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
| -
|
|
|
-
|
|
|
|
-
-
|
!
!
|
|
|
!
|
|
|
|
|
|
|
|
|
-
-
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
-
|
|
|
|
|
-
|
-
|
|
-
|
|
|
|
!
!
!
|
|
-
|
-
|
|
|
|
|
-
|
!
|
|
!
|
!
!
|
!
| (function () {
var IFRAME_IGNORE = [/\.pdf$/, /\.m[0-9]a$/, /\.mp.$/, /\.wmv$/, /\.midi?$/];
var iframe = _document.getElementById('ldrize_iframe');
if (iframe) {
_window.LDRize.removeKeyBind(' ');
_window.LDRize.removeKeyBind('S- ');
_document.body.focus();
if (LDRize.jQuery.fn.hide)
_window.execScript('(' + (function() {
LDRize.jQuery('#ldrize_iframe').hide('normal', function() {
document.body.removeChild(document.getElementById('ldrize_iframe'));
});
}).toString() + ')()');
else
_document.body.removeChild(_document.getElementById('ldrize_iframe'));
return;
}
if (!_window.LDRize) return;
var paragraph = _window.LDRize.getCurrentParagraph(); if (!paragraph) return;
var url = _window.LDRize.getParagraphLink(paragraph); if (url == '') return;
for (var i = 0; i < IFRAME_IGNORE.length; i++)
if (url.match(IFRAME_IGNORE[i]))
return;
var pos = LDRize.jQuery(paragraph).offset();
var iframe = _document.createElement('iframe');
try {
with (iframe.style) {
var doc = (document.compatMode == 'CSS1Compat') ? document.documentElement : document.body;
width = doc.clientWidth - 20;
height = doc.clientHeight - paragraph.offsetHeight - 40;
position = 'absolute';
zIndex = 1000;
top = pos.top + paragraph.offsetHeight;
left = document.body.scrollLeft + 10;
border = '1px solid gray';
display = 'none';
}
iframe.setAttribute('frameBorder', "0");
iframe.id = 'ldrize_iframe';
iframe.src = url;
_document.body.appendChild(iframe);
} catch(e) { return; }
_window.sleipnir = sleipnir;
_window.execScript('(' + (function() {
if (LDRize.jQuery.fn.show)
setTimeout(function() { LDRize.jQuery('#ldrize_iframe').show('normal'); }, 1);
else
document.getElementById('ldrize_iframe').style.display = 'block';
var sleipnir = window.sleipnir;
var spaceKey = function() {
var iframe = document.getElementById('ldrize_iframe');
if (iframe) {
iframe.contentWindow.focus();
setTimeout(
function() {
var sh = sleipnir.CreateObject('WScript.Shell')
sh.SendKeys(' ');
sh = null;
setTimeout(function() { document.body.focus(); }, 100);
}, 0);
}
};
window.LDRize.addKeyBind(' ', spaceKey);
window.LDRize.addKeyBind('S- ', spaceKey);
setTimeout(function() {
var iframe = document.getElementById('ldrize_iframe');
var hide = function() {
window.detachEvent('onscroll', hide);
window.LDRize.removeKeyBind(' ');
window.LDRize.removeKeyBind('S- ');
window.document.focus();
if (LDRize.jQuery.fn.hide)
LDRize.jQuery('#ldrize_iframe').hide('normal', function() {
document.body.removeChild(document.getElementById('ldrize_iframe'));
});
else
document.body.removeChild(document.getElementById('ldrize_iframe'));
};
window.attachEvent('onscroll', hide);
}, 100);
}).toString() + ')()');
_window.sleipnir = null;
})();
|