From 4296e7f4d8de64a62dbf5e5d152b19ae25df489e Mon Sep 17 00:00:00 2001 From: adripo <26493496+adripo@users.noreply.github.com> Date: Mon, 21 Apr 2025 19:59:40 +0200 Subject: 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 --- apps/browser-extension/index.html | 2 +- apps/browser-extension/src/Logo.tsx | 4 ++-- .../browser-extension/src/background/background.ts | 26 +++++++++++----------- apps/browser-extension/src/background/protocol.ts | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'apps/browser-extension') diff --git a/apps/browser-extension/index.html b/apps/browser-extension/index.html index 3ba58dda..2d43e6b1 100644 --- a/apps/browser-extension/index.html +++ b/apps/browser-extension/index.html @@ -4,7 +4,7 @@ - Hoarder + Karakeep
diff --git a/apps/browser-extension/src/Logo.tsx b/apps/browser-extension/src/Logo.tsx index c1a773b8..b7c470ca 100644 --- a/apps/browser-extension/src/Logo.tsx +++ b/apps/browser-extension/src/Logo.tsx @@ -4,10 +4,10 @@ import logoImg from "../public/logo-full.png"; export default function Logo() { return ( - hoarder logo + karakeep logo hoarder logo 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 = { diff --git a/apps/browser-extension/src/background/protocol.ts b/apps/browser-extension/src/background/protocol.ts index f4bcbcd8..ee5c3a6a 100644 --- a/apps/browser-extension/src/background/protocol.ts +++ b/apps/browser-extension/src/background/protocol.ts @@ -1 +1 @@ -export const NEW_BOOKMARK_REQUEST_KEY_NAME = "hoarder-new-bookmark"; +export const NEW_BOOKMARK_REQUEST_KEY_NAME = "karakeep-new-bookmark"; -- cgit v1.2.3-70-g09d2