14
2
On many webpages they are blocking copy/paste using JavaScript.
Is there any way for making such inputs work as the should (e.g. enable copy/paste)?
I’m using Google Chrome.
14
2
On many webpages they are blocking copy/paste using JavaScript.
Is there any way for making such inputs work as the should (e.g. enable copy/paste)?
I’m using Google Chrome.
13
Simply highlight the text and drag it into the text field. Try it here!
This works for me in Firefox and Chrome.
1Great solution! In chrome you can put this string into the address bar "data:text/html, <html contenteditable>" (without the quotes) to get a blank canvas. I created a bookmark to that. Now I can paste my text into this blank page, then drag it into the fields that need filling. – thin – 2018-10-04T18:08:47.933
This is the best. Trying to run js in the developer console was giving me a headache. Many thanks! – Millar248 – 2019-02-09T01:35:54.907
Cool, man? thank you.. You saved my time. – Vitali Petrov – 2019-12-04T08:12:24.890
7
It's hacky and won't work always but a lot of the time there is just a listener set for CTRL+C / CTRL+V and you can get around it by using CTRL+INS / SHIFT+INS instead of copy / paste.
If they are doing something goofy like using flash to write an empty string to the clipboard in a loop (twitch) then you are out of luck.
5
Here's an open source Chrome Extention
https://chrome.google.com/webstore/detail/dont-fuck-with-paste/nkgllhigpcljnhoakjkgaieabnkmgdkb
If you're interested in the code https://github.com/jswanner/DontFuckWithPaste
1This should be the correct answer. Don't Fuck With Paste has 465 stars on Github and practically a 5 star rating on the Chrome Store - with 413 reviews. This really helped me. Thanks! – Ben – 2018-06-24T13:48:11.117
For me, this extension helps, but does not work on all sites. – thin – 2018-10-04T18:10:38.520
5
If you're using Firefox, I found the following solution. Not sure what minimum version is required, however.
about:config
dom.event.clipboardevents.enabled
false
This allowed me to paste immediately after changing it. I didn't even have to restart the browser.
2
Press F12 and paste the following code into the console.
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
2
The easiest workaround (in terms of user-friendliness) for Google Chrome would be adding Allow Copy extension.
2Carefully vet that extension before installing. Reviewers are claiming it's malware. – George – 2017-01-19T21:48:39.193
1
Decide to add my solution to this (making a bookmarklet inspired from this repo and extension https://github.com/jswanner/DontFuckWithPaste) This bookmarklet will also allow copying on documents that disable that using javascript.
javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
– DavidPostill – 2017-10-30T18:19:27.9631
You could simply disable JavaScript on the page using a simple bookmarklet. From. http://javascript.about.com/library/bldis.htm
If you create a bookmark that contains the following script as the link (or even paste this code into the address bar and press enter) then it will rip all the JavaScript off of the current page:
javascript:void(d=document);if(frames.length){alert('Script%20doesn/'t%20work%20in%20frames');}else{while((el=d.getElementsByTagName('script')).length){el[0].parentNode.removeChild(el[0]);};onerror=function(){};d.close();}
The problem of course is that while you will now be able to paste into that text box if the form used JavaScript to submit the form then that too will be broken.
0
On windows you can use AutoHotkey
syntax:
::whatever::
Send [....text… Use {enter} for line breaks]
return
example: if you type xyz
it will write the text below (as if it was written)
::xyz::
Send hi {enter} This a new line {enter}. Another new line {enter} whatsoever. {enter}
return
1I like this one: ^Q:: SendInput, {Raw}%clipboard%
CTRL-Q sends the contents of the keyboard as input (similar to typing it in) – nijave – 2018-08-16T01:25:16.507
Its very unlikely. They don't put in that for no reason, so they'll also block any kind of way to circumvent it. – LPChip – 2015-05-26T10:49:38.610
There are lots of way of circumventing such scripts and a dedicated browser extension should solve many wariants of this issue. – syntagma – 2015-05-26T10:54:20.740
1If you already know this, why do you post the question? – LPChip – 2015-05-26T10:56:29.187
I know it is doable, I don't know about any such extension. – syntagma – 2015-05-26T10:57:11.437
If you were using Firefox, you could go to about:config and change dom.event.clipboardevents.enabled to false. I don't know if something similar exists in Chrome. – user276648 – 2017-07-18T03:05:23.380
If you use Linux you have a 2nd copy/paste buffer set, controlled by whatever the mouse has highlighted and middle button clickign to paste – ivanivan – 2018-03-14T18:19:36.093