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?

2

1 Answer 1

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.