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.

closed as off-topic by ale, jonsca Aug 21 '18 at 2:22

  • This question does not appear to be about web applications within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.