3 ms·
Here are two bookmarklets which might accomplish what you are requesting: javascript:window.location=window.location+'&title='+document.title javascri
by dm2 13y ago
Here are two bookmarklets which might accomplish what you are requesting:
javascript:window.location=window.location+'&title='+document.title
javascript:window.location=window.location+'#'+document.title
I don't mind the simple IDs for HN URLs.
The thing that I have the most trouble with is when bookmarking comments sections by dragging the "XX comments" link to my bookmarks bar, the title then saves as "XX comments" rather than the title of the article. This might be a browser / HTML issue though, I tried adding a "title" tag but that didn't fix it.
Updated bookmarklet below:
javascript:window.location=window.location+'&title='+document.title.replace(/[^A-Za-z0-9]/g, "_");
- eik3_de 13y agoIf you add converting non-url-safe characters to dashes I would call that bookmarklet a >90% sufficient solution that doesn't need any server-side changes. Users who need a readable URL just use the bookmarklet.
- dm2 13y agoJust replace document.title with document.title.replace(/[^A-Za-z0-9]/g, "_"); and it should work with all titles.