Quick-Copy Bookmarklets for the Shortcut Bar

When testing websites, and for other repetitive tasks it is sometimes nice to have some easily paste-able data. For instance, maybe you are filling out some kind of form and you are going to have to enter the same name, email address, phone, and mailing address over and over again.

Here is a nice little shortcut solution using bookmarklets. I know it works in Chrome. I don’t know about other browsers.

In Chrome, you will probably want to enable the bookmarks bar. <Ctrl><Shift><B> will pop it into view if it’s not there already.

Now, right click on the bookmark’s bar and select “Add Folder…”

Call the folder “QuickCopy” or whatever you feel like.

Here is the code for a bookmarklet:


javascript: (function() { text="TEXT TO PUT ON CLIPBOARD"; ta = document.createElement("textarea"); ta.textContent = text; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); })();


Copy this code to Notepad or to the comments field below and change TEXT TO PUT ON CLIPBOARD to whatever text you want, for instance: tester.test@testitestinesstesting.com. Now select the code and copy it again.

Right click on the QuickCopy folder and choose “Add Page…”.

Enter the text you want to paste in the Name field and paste the JavaScript code into the URL field. Click “Save.”

Make two or three more.

Now to quickly copy something to your clipboard, click QuickCopy and then choose a snippet. It should now be available on your clipboard for pasting.

You can change the text at any point by right-clicking on the link, choosing “Edit”, and changing the URL and Name.

Categories: Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *