mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Improves handling of old Internet Explorer versions
Adds warnings for versions under 9, and gracefully disables highlighting on IE8
This commit is contained in:
@@ -6,11 +6,25 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" type="text/css" href="font-awesome.css" />
|
||||
<link rel="stylesheet" type="text/css" href="browserOutput.css" />
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.mark.min.js"></script>
|
||||
<script type="text/javascript" src="json2.min.js"></script>
|
||||
|
||||
<!-- Completely skip loading any normal scripts if below IE8; we won't use them -->
|
||||
<!--[if gte IE 8]><!-->
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript" src="json2.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<!-- The following script(s) require IE9 or above -->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script type="text/javascript" src="jquery.mark.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 8]>
|
||||
<script type="text/javascript">
|
||||
alert("You are using an unsupported version of Internet Explorer. Please update to the latest version.");
|
||||
</script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 8]><!-->
|
||||
<div id="loading">
|
||||
<i class="icon-spinner icon-2x"></i>
|
||||
<div>
|
||||
@@ -41,5 +55,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="browserOutput.js"></script>
|
||||
<!--<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<script type="text/javascript">
|
||||
setTimeout(function(){
|
||||
output('<span class="internal boldnshit">You are using a very outdated version of Internet Explorer. Some features will not work correctly! Please update to a newer version.</span>', 'internal');
|
||||
}, 2000)
|
||||
</script>
|
||||
<![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -104,9 +104,13 @@ function setHighlightColor(match) {
|
||||
|
||||
//Highlights words based on user settings
|
||||
function highlightTerms(el) {
|
||||
var element = $(el)
|
||||
if(!(element.mark)) { // mark.js isn't loaded; give up
|
||||
return
|
||||
}
|
||||
for (var i = 0; i < opts.highlightTerms.length; i++) { //Each highlight term
|
||||
if(opts.highlightTerms[i]) {
|
||||
$(el).mark(opts.highlightTerms[i], {"element" : "span", "each" : setHighlightColor});
|
||||
element.mark(opts.highlightTerms[i], {"element" : "span", "each" : setHighlightColor});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -808,6 +812,10 @@ $(function() {
|
||||
});
|
||||
|
||||
$('#highlightTerm').click(function(e) {
|
||||
if(!($().mark)) {
|
||||
output('<span class="internal boldnshit">Highlighting is disabled. You are probably using Internet Explorer 8 and need to update.</span>', 'internal');
|
||||
return;
|
||||
}
|
||||
if ($('.popup .highlightTerm').is(':visible')) {return;}
|
||||
var termInputs = '';
|
||||
for (var i = 0; i < opts.highlightLimit; i++) {
|
||||
|
||||
Reference in New Issue
Block a user