Skip to content

Instantly share code, notes, and snippets.

@scottymac
Forked from javan/remove_hover.js.coffee
Created March 5, 2013 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottymac/5093286 to your computer and use it in GitHub Desktop.
Save scottymac/5093286 to your computer and use it in GitHub Desktop.
if 'createTouch' of document
ignore = /:hover\b/
try
for stylesheet in document.styleSheets
idxs = []
# detect hover rules
for rule, idx in stylesheet.cssRules
if rule.type is CSSRule.STYLE_RULE and ignore.test(rule.selectorText)
idxs.unshift idx
# delete hover rules
stylesheet.deleteRule idx for idx in idxs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment