Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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, "_");


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


Just replace document.title with document.title.replace(/[^A-Za-z0-9]/g, "_"); and it should work with all titles.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: