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 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.innerTextPersonally 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.
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.
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.
But the URL bar was not the problem.