Skip to content

Commit

Permalink
Merge pull request #55 from brave/fix-touch
Browse files Browse the repository at this point in the history
Add snippet option to remove Touch events
  • Loading branch information
antonok-edm authored Jan 31, 2022
2 parents be89734 + 8d78fc9 commit 2d77545
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/resources.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@
"mime": "application/javascript"
},
"resourcePath": "brave-fix.js"
},
{
"name": "touch-fix",
"aliases": [],
"kind": {
"mime": "application/javascript"
},
"resourcePath": "touch-fix.js"
}
]
6 changes: 6 additions & 0 deletions resources/touch-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Remove touch checks on selected mobile sites
delete Document.prototype.createTouch
delete Document.prototype.ontouchstart
delete Document.prototype.ontouchend
delete Document.prototype.ontouchcancel
delete Document.prototype.TouchEvent

0 comments on commit 2d77545

Please sign in to comment.