Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only use hyphenator.js on Chrome and Opera
All the other major browsers support CSS3 hyphens which is significantly faster. hyphenator.js is supposed to fallback to CSS3 on browsers that support it but testing has show it's still incredibly slow.
- Loading branch information
1 parent
c73a1f5
commit 357fbda
Showing
7 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// CSS hyphens is supported by IE10+, Firefox 6+, and Safari 5.1+ so only | ||
// use hyphenator.js for Chrome where support is still missing completely (as | ||
// of Chrome 29) and Opera (which now uses Chrome's rendering engine Blink). | ||
var re = /(Chrome|Opera)/; | ||
if (re.test(navigator.userAgent)) { | ||
document.write('<script src="/js/hyphenate.js" type="text/javascript"></script>'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters