mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-30 23:52:11 +01:00
Dev: Don't syntax highlight in IE6/7 as it slows them down hugely
This commit is contained in:
parent
5484fdaec3
commit
bf0b4d0a42
@ -1 +1 @@
|
||||
95edc5a4c02c6d7a55ca037d08220ca4f276976c
|
||||
a4e87505aa6087ba76eb5821e76304b7cf78ebf7
|
||||
|
7
examples/resources/syntax/shCore.js
vendored
7
examples/resources/syntax/shCore.js
vendored
@ -302,6 +302,13 @@ var sh = {
|
||||
*/
|
||||
highlight: function(globalParams, element)
|
||||
{
|
||||
// Don't run the syntax highlighter on IE6/7 as it absolutely kills
|
||||
// performance
|
||||
var userAgent = navigator.appVersion;
|
||||
if (userAgent.indexOf("MSIE 7.") !== -1 || userAgent.indexOf("MSIE 6.") !== -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elements = this.findElements(globalParams, element),
|
||||
propertyName = 'innerHTML',
|
||||
highlighter = null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user