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 1,133 times
0

Anton Kashpor
- 1,255
- 2
- 18
- 34
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
- 26,627
- 26
- 120
- 132