Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function(){
- const keys = [9,38,40,39,13];
- var allowAccessibility = function(event) {
- document.body.classList[keys.includes(event.keyCode) ? 'add' : 'remove']( 'user-focus' );
- }
- "keydown mousedown".split(" ").forEach(function(e){
- window.addEventListener(e, allowAccessibility, false);
- });
- }
Add Comment
Please, Sign In to add comment