diff options
author | Andreas Gohr <andi@splitbrain.org> | 2016-04-19 19:15:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2016-04-19 19:15:01 +0200 |
commit | 28b1b49a14ee5ff2a87776dafe3e092bc78674ad (patch) | |
tree | bf8e91c17bb60be3eb61ffdf222217e38bf9c7ad /lib/scripts/qsearch.js | |
parent | 55123b455b62405f9239c6de9768c1e7e4c57607 (diff) | |
download | dokuwiki-28b1b49a14ee5ff2a87776dafe3e092bc78674ad.tar.gz dokuwiki-28b1b49a14ee5ff2a87776dafe3e092bc78674ad.zip |
remove IE<=8 innerText/textContent workaround #1535
Standardized node.textContent is available since IE9
Diffstat (limited to 'lib/scripts/qsearch.js')
-rw-r--r-- | lib/scripts/qsearch.js | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js index 56cf8df25..18e51506c 100644 --- a/lib/scripts/qsearch.js +++ b/lib/scripts/qsearch.js @@ -135,18 +135,8 @@ jQuery.fn.dw_qsearch = function (overrides) { return; } - // make IE's innerText available to W3C conform browsers - if (this.textContent) { - this.__defineGetter__('innerText', function () { - return this.textContent - }); - this.__defineSetter__('innerText', function (val) { - this.textContent = val - }); - } - - nsL = this.innerText.indexOf('('); - nsR = this.innerText.indexOf(')'); + nsL = this.textContent.indexOf('('); + nsR = this.textContent.indexOf(')'); eli = 0; runaway = 0; @@ -169,12 +159,12 @@ jQuery.fn.dw_qsearch = function (overrides) { length = 1; replace = '…'; } - this.innerText = substr_replace(this.innerText, + this.textContent = substr_replace(this.textContent, replace, start, length); - eli = this.innerText.indexOf('…'); - nsL = this.innerText.indexOf('('); - nsR = this.innerText.indexOf(')'); + eli = this.textContent.indexOf('…'); + nsL = this.textContent.indexOf('('); + nsR = this.textContent.indexOf(')'); } }); |