fix: basic repair context-menu script broken by ACTCD · Pull Request #745 · quoid/userscripts · GitHub
Skip to content

fix: basic repair context-menu script broken#745

Merged
ACTCD merged 1 commit into
mainfrom
fix-issue-743-context-menu-script-broken
Oct 27, 2024
Merged

fix: basic repair context-menu script broken#745
ACTCD merged 1 commit into
mainfrom
fix-issue-743-context-menu-script-broken

Conversation

@ACTCD

@ACTCD ACTCD commented Oct 26, 2024

Copy link
Copy Markdown
Collaborator

fix #743

In old Safari browser.menus.remove just failed silently for non-existent menu item, but in the latest version it rejects the promise, causes failed functional due to unhandled throw.

Since all menu items are actually deleted every time, sessionStorage related logic is not necessary. So simply delete it.

Paths ending in / corresponding to different Match patterns are expected and can be avoided at the user level. There no need to handle it at the extension level, so the relevant logic is deleted.

Anyway, it's just a simple fix to get it basically working again.
But this feature needs to be completely redesigned and refactored.

@ACTCD ACTCD requested a review from quoid October 26, 2024 20:39
Base automatically changed from update-dependencies to main October 27, 2024 02:49
@ACTCD ACTCD merged commit a54946b into main Oct 27, 2024
@ACTCD ACTCD deleted the fix-issue-743-context-menu-script-broken branch October 27, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need to restart extension (or safari) to make context-menu script work

2 participants