Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Paste this into your console to enable click-to-copy on file paths
$('.file-info[title], .file-info [title]')
.css('cursor', 'pointer')
.click(function() {
var range = document.createRange();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Copying', range.toString(), 'was', msg);
} catch(err) {
console.log('Oops, unable to copy');

This comment has been minimized.

Copy link
Owner Author

@himedlooff himedlooff commented Oct 14, 2015

You can sue to generate a bookmarklet as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.