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
/** | |
* Detect "touch" support and act accordingly. | |
* Adds `touch` class and assumes there is `no-touch` class added in <html> element. | |
*/ | |
let hasTouch = false; | |
const docEl = document.documentElement; | |
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || navigator.msMaxTouchPoints) { | |
docEl.className = docEl.className.replace(/(^|\s)no-touch(\s|$)/, ' touch '); | |
hasTouch = true; |
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
(^\/\/.*)|(\s+\/\/.*)|((\/\*)(.|\n)+?(\*\/)) |
NewerOlder