Create a manifest V3 code for an Edge and Chrome extension with the following…
- User
Create a manifest V3 code for an Edge and Chrome extension with the following functionality:
Functionality Overview: Trigger Shortcut:
When the user holds the Alt key first and then holds the left mouse button (prevents text selection when holding alt key and hold left mouse), and then dragging the mouse will display a rectangular selection area with a yellow border with a border size of 4 (transparent inside, only the border has color).
Highlight Links:
All clickable links (such as image links or text links) within the selection area will have a blue border (transparent inside, only the border has color) with a border size of 4.
Link Count Display:
The number of links within the selection area will be displayed in the bottom-right corner of the selection area with a black background and white text (text size 14).
Link Opening Behavior:
If the user releases the Alt key first, the selection area is canceled without opening any links.
If the user releases the left mouse button while holding the Alt key (rules of open link), all links within the selection area will open in new tabs from the current tab.
Extension Options:
An option to add elements to detect links within input boxes (in format like "li.shopee-search-item-result__item .article-name, .article-link,") and when user select and drag over that add element and release left mouse (match rules of open link) it will open that add element too (it show highlights and open link).
Auto-save changes to the extension's options.
Script Execution: The script is activated when both the trigger keys (Alt and left mouse button) are held down.
The selection area appears while dragging the mouse (it will show from when first mouse drag and maintain that point until user release alt key ,it will not repeat show old value area).
Releasing the Alt key cancels the selection area (make sure it will not show same selection area if user release alt key it should show only if user hold alt and hold left mouse and drag it will always show area where left mouse is first hold and drag from that not just hold or click both alt and left mouse but drag too).
Opening Tabs to the Right of the Current Tab: When the user releases the left mouse button while holding the Alt key, the extension should open all unique links within the selection area in new tabs to the right of the current tab, preserving tab order, and it will not count and open duplicate link.
and when user hold alt + hold left mouse and drag to top or bottom edge it will auto scroll down at bottom or up at the top while selection area still update and cover more link.
,explain first then show complete code.
- Assistant