Open WebUI Context Menu EN
UnitedWeRide · Firefox
Create and use custom context menu items to query Open WebUI when browsing the web
截图
简介
A Firefox extension that adds context menu items for interacting with OpenWebUI directly from any webpage.
Create and use custom context menu items to query Open WebUI when browsing the web
OpenWebUI Context Menu – Version 2.5
Highlights
- Custom Context Menu Items as Defaults – The default "Explain" and "Research" context menu items have been removed and replaced with fully customizable custom context menu items. This provides users with complete control over these essential prompts.
- Migration of Existing Defaults – Existing users' "Explain" and "Research" prompts and their associated settings will be automatically migrated to new custom context menu items upon extension update or settings import, ensuring a seamless transition without loss of data.
- Increased Custom Menu Limit – The maximum number of custom context menu items has been increased to 10 to accommodate the new default custom items and provide more flexibility.
- Automatic Settings Saving – All settings, including custom context menu items, are now saved automatically as you make changes. The manual "Save Settings" button has been removed for a more seamless and intuitive user experience.
- Debounced Saving – To ensure optimal performance, a debouncing mechanism has been implemented. This means that changes are saved a moment after you stop typing, preventing excessive writes to the browser's storage.
- Improved User Experience – The new automatic saving feature eliminates the need to manually save changes, making the settings page more user-friendly and efficient.
- Enhanced URL Detection with Source Selection & Dynamic Tooltips – Fixed an issue where YouTube detection would incorrectly add
youtube.com/watch?v=trueto the query. Users can now explicitly choose the source for YouTube video ID and general URL detection (Selected Text Only, Page URL Only, or Prefer Selected Text) for all custom context menu items. Dynamic tooltips have been added next to each source selection dropdown, providing clear explanations that update based on the selected option. Only a single YouTube video ID or URL will be passed to Open WebUI, based on the selected preference. - Auto-Scrolling for New Menus – When a new custom context menu item is added, the page now automatically scrolls to display the newly created item.
Changes Made
Options UI (options.html + options.js)
- Removed Default Prompt UI – The dedicated UI sections for "Prompt 1" (Explain) and "Prompt 2" (Research) have been removed from
options.html. - Removed Manual Save Button – The "Save Settings" button has been removed from the options page.
- Implemented Automatic Saving – A new
saveSettingsfunction has been added to automatically save all settings to the browser's storage. - Added Debouncing – A
debouncefunction has been implemented to prevent excessive storage writes, ensuring a smooth and responsive user experience. - Event Listeners – Event listeners have been added to all input fields, text areas, and checkboxes to trigger the debounced save function when changes are made.
- Simplified Custom Menu Creation – The "Save Item" button for new custom context menu items has been removed, as they are now saved automatically.
- Auto-Scroll on New Menu Add – Implemented
Element.scrollIntoView()to automatically scroll to a newly added custom context menu item. - Migration Logic – Added logic in
options.jsto detect and convert old default "explain" and "research" prompts into new custom context menu items upon loading the options page or importing settings. - Increased Custom Menu Limit – The maximum number of custom context menu items allowed has been increased to 10.
Background Script (background.js)
- Removed Default Context Menu Creation – The code responsible for creating the hardcoded "openwebui-query" and "openwebui-research" context menu items has been removed.
- Updated Storage Loading – The
loadSettingsfunction no longer attempts to loadexplainPrompt,researchPrompt,explainPromptTitle,researchPromptTitle, orquerySettingsdirectly, as these are now handled via custom context menus. - Updated Storage Change Listener – The
onChangedlistener now only reacts to changes incustomContextMenus. - Refined Context Menu Click Handler – The
onClickedlistener now exclusively processes custom context menu items, removing the conditional logic for default prompts. - Refined YouTube/Load URL Parameter Handling – The
extractYouTubeVideoIdandextractLoadUrlfunctions inbackground.jshave been updated to extract a single YouTube video ID or general URL based on the user's source preference (Selected Text Only, Page URL Only, or Prefer Selected Text). This ensures compatibility with Open WebUI, which only accepts a singleyoutubeorload-urlparameter. The logic now prioritizes the selected source and prevents incorrectyoutube=trueorloadUrl=trueparameters from being appended. - Source Selection UI in Options – Added dropdowns in the options page for all cust…
Open WebUI Context Menu 是做什么的
Open WebUI Context Menu 是一款面向 Firefox 的搜索增强类扩展,主要用来补充搜索结果、切换搜索引擎、过滤无效结果。官方对它的介绍是:Create and use custom context menu items to query Open WebUI when browsing the web在Firefox 附加组件商店(AMO)上,它当前版本 2.5,评分 5(1 人评价),约 63 名用户。
适合什么人用
从功能定位看,Open WebUI Context Menu 更适合每天大量搜索、希望结果更干净准确的用户。如果你平时只是偶尔遇到相关需求,用浏览器自带功能也能凑合;但如果这件事每天都发生,装一个专门处理它的扩展通常比手动操作省事得多。
怎么安装 Open WebUI Context Menu
- 打开Firefox 附加组件商店(AMO)上的官方页面;
- 点「添加到浏览器」并确认权限提示;
- 装好后在扩展列表里固定图标,方便随时开关。
本站只做索引与介绍,安装包来自官方商店。如果商店页面提示当前地区不可用,说明该扩展未在你所在区域上架。
常见问题
Open WebUI Context Menu 是免费的吗?
Open WebUI Context Menu 在Firefox 附加组件商店(AMO)免费提供下载。它是浏览器扩展,装上就能直接用,不需要注册账号。
Open WebUI Context Menu 安全吗?
它只申请了 0 项权限,范围比较克制,没有申请「读取所有网站数据」这种大权限。
Open WebUI Context Menu 支持哪些浏览器?
当前收录的版本来自Firefox 附加组件商店(AMO),适用于 Firefox。同一个扩展在其他商店可能有对应版本,但功能与版本号不一定相同。
怎么卸载 Open WebUI Context Menu?
在扩展管理页找到 Open WebUI Context Menu,点移除即可。它在本地保存的设置会一起清掉,不会残留数据。
权限清单 来自 manifest.json 原文
接口权限 3
contextMenusstoragetabs

