Skip to content

Instantly share code, notes, and snippets.

@himalay
Last active May 2, 2018 02:54
Show Gist options
  • Save himalay/3c0ab27b011044a645ff7ed0fd377d6a to your computer and use it in GitHub Desktop.
Save himalay/3c0ab27b011044a645ff7ed0fd377d6a to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Normalize e-remit
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Removes weblimits for demo.eremit.com.my
// @author You
// @match https://demo.eremit.com.my/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
'contextmenu|copy|cut|dragenter|dragover|dragstart|drop|keydown|keyup|mousedown|mouseup|paste|select|selectstart'
.split('|')
.forEach(event => document.addEventListener(event, e => {
if (['A', 'BUTTON'].indexOf(e.target.tagName) === -1) {
e.stopImmediatePropagation();
return true;
}
}, true));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment