Skip to content

Instantly share code, notes, and snippets.

@MohamedElashri
Last active May 28, 2023 04:33
Show Gist options
  • Select an option

  • Save MohamedElashri/aea98b760118d2d696f1df87dae428cc to your computer and use it in GitHub Desktop.

Select an option

Save MohamedElashri/aea98b760118d2d696f1df87dae428cc to your computer and use it in GitHub Desktop.
Kagi's universal summary bookmarklet (summary and key moments)
javascript:(function() {
try {
var url = new URL(window.location.href);
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
alert("Unsupported protocol. HTTP and HTTPS URLs are supported.");
} else {
window.open('https://kagi.com/summarizer/index.html?url=' + encodeURIComponent(url) + '&expand=true');
}
} catch (error) {
alert("Invalid URL or an error occurred: " + error.message);
}
})()
javascript:(function() {
try {
var url = new URL(window.location.href);
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
alert("Unsupported protocol. HTTP and HTTPS URLs are supported.");
} else {
window.open('https://kagi.com/summarizer/index.html?url=' + encodeURIComponent(url));
}
} catch (error) {
alert("Invalid URL or an error occurred: " + error.message);
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment