I want to put javascript code into android's browsers apps from clipboard. It works fine, but chrome always deletes word "javascript:" from pasted data.
For example: instead of javascript:(function(){
it paste only (function(){
.
How can I paste JS without auto-deleting?
Asked
Active
Viewed 840 times
0
Anton Kashpor
- 1,075
- 2
- 13
- 32
1 Answers
0
Possible reason for your problem. Google doesn't support access to clipboard using Chrome anymore.
You can try this trick though:
function copyToClipboard(text) {
window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
}
Community
- 1
- 1
Ojonugwa Jude Ochalifu
- 23,935
- 25
- 104
- 122