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

Related. This is the bookmark I use to summarize websites using ChatGPT:

    javascript:window.open('https://chatgpt.com/?q=summarize this page in 100 words: '+encodeURIComponent(window.location.href),'_blank');
Basically it opens a new tab on chatgpt.com with the prompt: "summarize this page in 100 words: URL"

Tested on Firefox and Chrome.

Some websites block ChatGPT and can't be summarized this way.

Works in incognito/anonymous mode and doesn't require a ChatGPT account.

You can probably use another AI service with this idea.



Here's a version of that which should work for any page, whether or not they allow ChatGPT URL access:

    javascript:window.open('https://chatgpt.com/?q=summarize this page in 100 words: '+encodeURIComponent(document.body.innerText),'_blank');
I swapped window.location.href for document.body.innerText


I’m sure Openai likes this use case, a neat way to access data where they are otherwise blocked.

Personally I’d worry about using this accidentally and with some sensitive data (eg logins).

I do like the idea though, I’d use this with a local model.


Nice! Thank you!

I just wonder if browsers will limit the amount of characters in URLs.

If memory serves me, there was a limit. But it might be high enough to work fro most pages.


It's around 8KB now – so text bigger than 8 thousand characters will return: "414 Request-URI Too Large".

Anyway the document.body.innerText contains all things on the site, including links, menus, buttons etc just 1 per newline. LLM will only recognise if it previously scanned the same website and it did not change much since the last training set. Some arbitrary websites it will not recognise this way and start hallucinating one because innerText removes all the structure from it.


Modern browsers are not an issue here, e.g. chromium allows 2MB; the issue is with web server's limits.


Indeed, I'm getting Cloudflare error "414 Request-URI Too Large" for this HN post which isn't large.

But the URL bar was not the problem.


I was surprised about the "doesn't require a ChatGPT account" part but when I tried it from an incognito window their "4o mini" gave back

I cannot access external links directly. However, if you provide the text or key points from the page, I can help summarize it for you!

and clicking the model selection drop-down produced "Log in to try advanced features"


interesting so it didn't work for you unfortunately. Give me 2 minutes I'll try it and screenshot the result in both browsers.

edit: you're right it requires the user to be logged in to crawl websites. Somehow in my test while writing it I was logged in. My bad.

So while it's handy, it's not perfect.


That only works for public pages. It can't summarize some attachment to your email, for example.




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

Search: