Skip to content

Instantly share code, notes, and snippets.

@Julioevm
Last active July 22, 2023 04:34
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Julioevm/68275ea1324046caedfdfb2ba0e9b710 to your computer and use it in GitHub Desktop.
Save Julioevm/68275ea1324046caedfdfb2ba0e9b710 to your computer and use it in GitHub Desktop.
Kagi summarize bookmarklet
javascript:(
function() {
let currentUrl = encodeURIComponent(window.location.href);
window.open('https://kagi.com/summarizer/index.html?url=' + currentUrl + '&target_language=&summary=takeaway');
})();
@CADawg
Copy link

CADawg commented Jun 29, 2023

Those %27's need to be ' instead as it doesn't unquote currently meaning it sends kagi ' + currentUrl + ' as the website. Also, the %27 after the takeaway breaks the query

Edited it and compiled it with google clojure and got the following

javascript:var currentUrl%3DencodeURIComponent(window.location.href)%3Bwindow.open("https%3A%2F%2Fkagi.com%2Fsummarizer%2Findex.html%3Furl%3D"%2BcurrentUrl%2B"%26target_language%3D%26summary%3Dtakeaway")%3Bvoid+0

@Julioevm
Copy link
Author

The saved bookmarklet script code has the quotes turned into %27, I messed up when pasting it here

@CADawg
Copy link

CADawg commented Jun 29, 2023

Awesome, thanks for fixing it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment