Skip to content

Instantly share code, notes, and snippets.

@Julioevm
Last active August 24, 2024 20:05
Show Gist options
  • 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