5

This links tell me how to create a bookmarklet for copying a tab’s title.

javascript:var%20title=document.title;if(title){var%20re=/(\|/|:|*|?|%22|<|>||)/gi;title=title.replace(re,'');void(prompt('Page%20Title',%20title));}

I want to copy both the URL and the title in the bookmarklet—how can I do it? I don't want an add-on.

  • 1
    I'm voting to close this question as off-topic because questions about bookmarklets are no longer on-topic here. – ale Aug 21 '18 at 1:24
4

This should do it:

javascript:title=document.URL + ' ' + document.title;if(title){void(prompt('Page Title',title));}

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