1

I constantly have to test websites and they always ask the same ID number or zipcode or something. Since I don´t want to give my real number, I always copy and past it from a .txt I have on my computer that has some fake numbers that will past the verification.

I was wondering if I could make my life easier by automating part of this work. My idea was to use Bookmarklet (https://en.wikipedia.org/wiki/Bookmarklet) and the command copy() from google Chrome (https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference#copyobject).

It unfortunately did not work. Any ideas who to do that?

I´ve tried:

javascript:(function(){
  copy(1235465);
})();

and

javascript:{copy(1235465);};void(0);

but neither of them have worked.

Is this even possible?

Ciro Shia
  • 67
  • 2
  • 6
  • Please add the code you've tried. – jmargolisvt Jan 18 '18 at 18:40
  • Does this answer your question? [Copy text to clipboard from bookmarklet](https://stackoverflow.com/questions/5046972/copy-text-to-clipboard-from-bookmarklet) – Roy Jan 15 '21 at 20:32

1 Answers1

0

I´ve found a answer for that here: Copy text to clipboard from bookmarklet

Sorry for the duplicated question.

Here is the link to the gitHub as well:

https://gist.github.com/stefanmaric/2abf96c740191cda3bc7a8b0fc905a7d

Ciro Shia
  • 67
  • 2
  • 6