-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolymer.html
95 lines (93 loc) · 4.87 KB
/
polymer.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Polymer browser compatibility testing</title>
<script>
if (! ('registerElement' in document
&& 'createShadowRoot' in HTMLElement.prototype
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template'))) {
document.write('<script src="//cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.5.1-1/webcomponents.js"><\/script>');
document.write('<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>');
document.write('<script type="text/javascript" src="pgwbrowser.min.js"><\/script>');
}
</script>
<link rel="import" href="//www.polymer-project.org/components/polymer/polymer.html">
</head>
<body unresolved fullbleed>
<div id="supportedBrowser">Good Browser!</div>
<div id="unsupportedBrowser"> We're sorry, but your browser is not supported by the system.
<script type="text/javascript">
</script>
</div>
<script>
var $buoop = {
vs: {i:10,f:15,o:15,s:7,c:36}, // browser versions to notify
reminder: 0, // after how many hours should the message reappear
// 0 = show all the time
onshow: function(infos){}, // callback function after the bar has appeared
onclick: function(infos){}, // callback function if bar was clicked
l: false, // set a language for the message, e.g. "en"
// overrides the default detection
test: false, // true = always show the bar (for testing)
text: "Please upgrade to the latest version of <a href='http://www.google.com/chrome'>Google Chrome</a> to get the best experience on this site", // custom notification html text
text_xx: "", // custom notification text for language "xx"
// e.g. text_de for german and text_it for italian
newwindow: true // open link in new window/tab
};
function $buo_f(){
var e = document.createElement("script");
e.src = "//browser-update.org/update.js";
document.body.appendChild(e);
};
try {
document.addEventListener("DOMContentLoaded", $buo_f,false)
(function () {
window.addEventListener('polymer-ready', function() {
document.getElementById('unsupportedBrowser').style.display = 'none';
});
}());
}
catch(e) {
if (window.jQuery) {
$(document).ready(function () {
var pgwBrowser = $.pgwBrowser();
var e = document.createElement("div");
e.id = "browserDetails";
switch (pgwBrowser.os.group) {
case 'iOS':
if (pgwBrowser.os.majorVersion < 6) {
e.innerHTML = '<br \/><br \/>You are currently using an unsupported version of Safari bundled with Apple iOS version ' + pgwBrowser.os.fullVersion + '. We can only support Safari in Apple iOS version 6 and above.'
}
break;
case 'Windows Phone':
if (pgwBrowser.os.majorVersion < 8 && pgwBrowser.os.minorVersion < 1) {
e.innerHTML = '<br \/><br \/>You are currently using a version of Windows Phone older than version 8.1 (version ' + pgwBrowser.os.fullVersion + '). We can only support version 8.1 and above.'
}
break;
case 'Android':
if (pgwBrowser.os.majorVersion < 4 && pgwBrowser.os.minorVersion < 4) {
e.innerHTML = '<br \/><br \/>Since you are using Android (version ' + pgwBrowser.os.fullVersion + ') you can upgrade from the old Android Browser to <a href=\'https:\/\/play.google.com\/store\/apps\/details?id=com.android.chrome&hl=en\'>Google Chrome for Android<\/a> to get a faster, and compatible web experience.';
}
break;
}
document.body.appendChild(e);
var o = document.createElement("div");
o.id = "browserDetailsOld";
o.innerHTML = "<br \/><br \/>You can still use <a href=\'https:\/\/www.library.uq.edu.au\/mylibrary\'>the old version of MyLibrary<\/a>.";
document.body.appendChild(o);
});
}
if (window.addEventListener) {
window.addEventListener("onload", $buo_f, false);
} else if (window.attachEvent) {
window.attachEvent("onload", $buo_f);
} else {
window["onload"] = $buo_f;
}
}
</script>
</body>
</html>