Get clipboard contents with Greasemonkey

陌路散爱 提交于 2019-12-01 12:06:47
Brock Adams

No, you cannot do this in javascript because it has proven to be a huge security hole.
Likewise, the developers of Greasemonkey are unlikely to add this capability for the same reasons.


You can write a Firefox add-on that does this, but I've never seen a (legit) use case.

A technique that works well for me is to have the Greasemonkey script set focus to the textarea (or input) and then I merely press CtrlV. It's super convenient and actually faster than grabbing the mouse to click a button.

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