diff options
| author | adripo <26493496+adripo@users.noreply.github.com> | 2025-04-21 19:59:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-21 18:59:40 +0100 |
| commit | 4296e7f4d8de64a62dbf5e5d152b19ae25df489e (patch) | |
| tree | a976ea13ec1396078de2047fdcb125bb086c6a17 /apps/browser-extension/src/background/background.ts | |
| parent | 86728d7f0e48e5cf8fbd1977240909302b2d8ad9 (diff) | |
| download | karakeep-4296e7f4d8de64a62dbf5e5d152b19ae25df489e.tar.zst | |
chore: rename missing files/conf from Hoarder to Karakeep (#1280)
* refactor: Rename remaining project configuration from Hoarder to Karakeep
* some fixes
---------
Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/browser-extension/src/background/background.ts')
| -rw-r--r-- | apps/browser-extension/src/background/background.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/browser-extension/src/background/background.ts b/apps/browser-extension/src/background/background.ts index 98d2ef36..6d8a6ecd 100644 --- a/apps/browser-extension/src/background/background.ts +++ b/apps/browser-extension/src/background/background.ts @@ -10,8 +10,8 @@ import { } from "../utils/settings.ts";
import { NEW_BOOKMARK_REQUEST_KEY_NAME } from "./protocol.ts";
-const OPEN_HOARDER_ID = "open-hoarder";
-const ADD_LINK_TO_HOARDER_ID = "add-link";
+const OPEN_KARAKEEP_ID = "open-karakeep";
+const ADD_LINK_TO_KARAKEEP_ID = "add-link";
function checkSettingsState(settings: Settings) {
if (settings?.address) {
@@ -22,39 +22,39 @@ function checkSettingsState(settings: Settings) { }
function removeContextMenus() {
- chrome.contextMenus.remove(OPEN_HOARDER_ID);
- chrome.contextMenus.remove(ADD_LINK_TO_HOARDER_ID);
+ chrome.contextMenus.remove(OPEN_KARAKEEP_ID);
+ chrome.contextMenus.remove(ADD_LINK_TO_KARAKEEP_ID);
}
/**
* Registers
- * * a context menu button to open a tab with the currently configured hoarder instance
- * * a context menu button to add a link to hoarder without loading the page
+ * * a context menu button to open a tab with the currently configured karakeep instance
+ * * a context menu button to add a link to karakeep without loading the page
*/
function registerContextMenus() {
chrome.contextMenus.create({
- id: OPEN_HOARDER_ID,
- title: "Open Hoarder",
+ id: OPEN_KARAKEEP_ID,
+ title: "Open Karakeep",
contexts: ["action"],
});
chrome.contextMenus.create({
- id: ADD_LINK_TO_HOARDER_ID,
- title: "Add to Hoarder",
+ id: ADD_LINK_TO_KARAKEEP_ID,
+ title: "Add to Karakeep",
contexts: ["link", "page", "selection", "image"],
});
}
/**
- * Reads the current settings and opens a new tab with hoarder
+ * Reads the current settings and opens a new tab with karakeep
* @param info the information about the click in the context menu
*/
async function handleContextMenuClick(info: chrome.contextMenus.OnClickData) {
const { menuItemId } = info;
- if (menuItemId === OPEN_HOARDER_ID) {
+ if (menuItemId === OPEN_KARAKEEP_ID) {
getPluginSettings().then((settings: Settings) => {
chrome.tabs.create({ url: settings.address, active: true });
});
- } else if (menuItemId === ADD_LINK_TO_HOARDER_ID) {
+ } else if (menuItemId === ADD_LINK_TO_KARAKEEP_ID) {
let newBookmark: ZNewBookmarkRequest | null = null;
if (info.selectionText) {
newBookmark = {
|
