I often need to copy a variable in Chrome dev tools console to my clipboard. Fortunately, Chrome has this feature built-in using the copy() function.
- Save the variable or right-click an object in Chrome’s console and select Store as Global Variable from the context menu. It will return something like temp1 as the variable name.
- Use the copy() method, so copy(temp1) in the console should copy that object to your clipboard.
Thanks for reading. Make sure you follow me on Twitter to stay up to date on the progress of my side projects T.LY, Weather Extension, and Link Shortener Extension. If you are interested in the tech I use daily, check out my uses page.