-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.html
54 lines (52 loc) · 1.94 KB
/
demo.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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>FlashBlockNotifier demo page</title>
<script src="//yandex.st/swfobject/2.2/swfobject.min.js"></script>
<script src="flashblocknotifier.js"></script>
</head>
<body>
<p>This is demo page for <a href="https://github.com/doochik/FlashBlockNotifier">FlashBlockNotifier</a> project.</p>
<p>FlashBlockNotifier is a wrapper for swfobject that detects FlashBlock extensions in browsers (Chrome, Firefox, Opera, Safari).</p>
<p><a href="https://github.com/doochik/FlashBlockNotifier/blob/master/demo.html">This page source code</a>.</p>
<div id="example" style="border-top: 1px solid #000">
<p>
<span id="result" style="padding: 5px;">
<span>Result:</span>
<span id="result_text"></span>
</span>
</p>
<div id="flash_is_here" style="width:425px;height:356px;"></div>
<script>
FlashBlockNotifier.embedSWF(
'http://static.video.yandex.ru/lite/ya-events/ybbu1xj64h.2816/',
'flash_is_here',
450,
254,
'8.0.0',
null,
null,
{ allowScriptAccess: "always" },
{},
function(e) {
var res = '';
var color = '';
if (e.success) {
res = 'no FlashBlock';
color = '#BFB';
} else if (!e.success && e.__fbn) {
res = 'FlashBlock detected';
color = '#BBF';
} else {
res = 'Flash is not installed';
color = '#FBB';
}
document.getElementById('result_text').innerHTML = res;
document.getElementById('result').style.background = color;
}
);
</script>
</div>
</body>
</html>