Bookmarklet to open url and enable copy/paste

0

I have a site that disables pasting the username/password, thus disabling my password manager.

I found this javascript code for a bookmarklet that enables copy/paste on the site your on, and it works great:

javascript: (function () {
  allowCopyAndPaste = function (e) {
    e.stopImmediatePropagation();
    return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})();

However, I have 0 javascript coding skills. How can I modify this to open the URL then apply the code?

cstafford

Posted 2019-07-03T14:19:54.943

Reputation: 1

No answers