How to enable paste on HTML page with locked “Cmd+V”?

為{幸葍}努か 提交于 2019-12-23 05:02:04

问题


Often you can enter pages, which has disabled paste from Clipboard, like input password or Credit card numbers, which is very silly, because who keeps in memory complex passwords or CC numbers? People like to use password keepers for those things. I found that problem is in:

... b.bind("paste",function(){return!1} ...

How to deal with it? How to unbind interception of paste method?


回答1:


Came up with script - you need to open browser console and execute:

$('*').each(function(){                                                
    var $this = $(this);
    $this.unbind('paste');
});

Need to inject jQuery first, if there is no one



来源:https://stackoverflow.com/questions/28266689/how-to-enable-paste-on-html-page-with-locked-cmdv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!