Last active
November 11, 2024 11:48
-
-
Save rishubil/9b1b38e18b21a8d9fdda6ac6cd2602f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Open in Kagi | |
// @description Open current page in Kagi Services | |
// @namespace open-in-kagi | |
// @version 0.0.4 | |
// @match *://*/* | |
// @updateURL https://gist.github.com/rishubil/9b1b38e18b21a8d9fdda6ac6cd2602f5/raw/open-in-kagi.user.js | |
// @downloadURL https://gist.github.com/rishubil/9b1b38e18b21a8d9fdda6ac6cd2602f5/raw/open-in-kagi.user.js | |
// @grant GM_registerMenuCommand | |
// @grant GM_openInTab | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
function openKagiUniversalSummarizer() { | |
GM_openInTab( | |
'https://kagi.com/summarizer/index.html?target_language=KO&summary=summary&url=' + encodeURIComponent(location.href), | |
{ | |
active: true | |
} | |
); | |
} | |
function openKagiTranslate() { | |
GM_openInTab( | |
'https://translate.kagi.com/English/Korean/' + encodeURIComponent(location.href), | |
{ | |
active: true | |
} | |
); | |
} | |
GM_registerMenuCommand( | |
'Open in Kagi Universal Summarizer', | |
openKagiUniversalSummarizer, | |
'U' | |
); | |
GM_registerMenuCommand( | |
'Open in Kagi Translate', | |
openKagiTranslate, | |
'T' | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment