mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 23:55:29 +02:00
refactor: Remove unnecessary code in ZenViewSplitter.mjs and initialize workspace tab context menus in ZenWorkspaces.mjs
Remove the `insertSplitLinkIntoContextMenu` method in ZenViewSplitter.mjs as it is no longer needed. Additionally, initialize the workspace tab context menus in ZenWorkspaces.mjs to allow users to change the workspace of a tab. Refactor ZenViewSplitter.mjs: - Remove `insertSplitLinkIntoContextMenu` method Refactor ZenWorkspaces.mjs: - Initialize workspace tab context menus
This commit is contained in:
parent
bfda024538
commit
ccea9cbae7
2 changed files with 42 additions and 14 deletions
|
@ -109,18 +109,6 @@ var gZenViewSplitter = new class {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the split link into the context menu.
|
||||
*/
|
||||
insertSplitLinkIntoContextMenu() {
|
||||
const element = window.MozXULElement.parseXULToFragment(`
|
||||
<menuitem id="context-split-with-newtab" data-l10n-id="floorp-split-view-open-menu"
|
||||
oncommand="gSplitView.splitLinkInNewTab();" hidden="true"/>
|
||||
<menuseparator id="context-stripOnShareLink"/>
|
||||
`);
|
||||
document.getElementById("context-stripOnShareLink").after(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the split view tab context menu item.
|
||||
*/
|
||||
|
@ -139,7 +127,6 @@ var gZenViewSplitter = new class {
|
|||
* Initializes the context menu.
|
||||
*/
|
||||
initializeContextMenu() {
|
||||
this.insertSplitLinkIntoContextMenu();
|
||||
this.insertSplitViewTabContextMenu();
|
||||
this.insetUpdateContextMenuItems();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue