diff --git a/src/page.ts b/src/page.ts index 86eb8ad..22eccf7 100644 --- a/src/page.ts +++ b/src/page.ts @@ -92,6 +92,7 @@ type PagePanelInfo = { } type PageAlertInfo = { text: string + timeout?: number } type FormField = { question: string @@ -459,11 +460,11 @@ textarea }; const insertAlert = (alertType: PageAlertType, alertsInfo: Record | undefined, - previousSibling: HTMLElement, timeout = -1, - tooltip = "", formatText = (text: string) => text) => { + previousSibling: HTMLElement, timeoutDefault = -1, tooltip = "", formatText = (text: string) => text) => { if (!alertsInfo) { return; } + const timeout = alertsInfo[alertType].timeout ?? timeoutDefault; const alert = document.createElement("label"); alert.classList.add("alert"); alert.classList.add(alertType); diff --git a/src/sendoff.ts b/src/sendoff.ts index 28f5481..5a201fe 100644 --- a/src/sendoff.ts +++ b/src/sendoff.ts @@ -118,7 +118,8 @@ However, Mark My Search will only improve if we know what needs fixing.`, }, alerts: { [PageAlertType.SUCCESS]: { - text: "Success", + text: "Thank you, your feedback will be carefully considered!", + timeout: -1, }, [PageAlertType.FAILURE]: { text: "Status {status}: {text}", diff --git a/src/startpage.ts b/src/startpage.ts index 0055531..4fe8ce7 100644 --- a/src/startpage.ts +++ b/src/startpage.ts @@ -49,7 +49,7 @@ const loadStartpage = (() => { text: "Find matches", onClick: (messageText, formFields, onSuccess) => { if (chrome.runtime.getURL("/").startsWith("chrome-extension://")) { - chrome.search.query({ + chrome.search["query"]({ disposition: "NEW_TAB", text: messageText, }, onSuccess); @@ -269,7 +269,9 @@ See Features > Keyword Matching for details of these options.`, text: "Toolbar - click keyword buttons to scroll to the next match.", }, note: { - text: "Press [Shift+Space] to jump to the next generic match, or assign a shortcut like [Alt+Shift+1] for each term.", + text: +`Press [Alt+Space] to jump to the next generic match, and [Alt+Shift+Space] for the previous, +or assign a shortcut like [Alt+Shift+1] for individual terms.`, }, }, { diff --git a/src/term-highlight.ts b/src/term-highlight.ts index e4ec353..33a62ae 100644 --- a/src/term-highlight.ts +++ b/src/term-highlight.ts @@ -1967,6 +1967,7 @@ const getTermsFromSelection = () => { if (message.deactivate) { terms.splice(0); removeControls(); + restoreNodes(); } if (message.enablePageModify !== undefined) { controlsInfo.pageModifyEnabled = message.enablePageModify;