on master help sign in
Remove the new-tab-in-group shortcut
ea3b548Claude
README.md+1−2
@@ -63,7 +63,6 @@ Open Diagonal's settings page and click **Run self-test**. Expect `fmAvailable:
63| --- | --- |
63| --- | --- |
64| Organize this window | Alt+Shift+G |
64| Organize this window | Alt+Shift+G |
65| Name the current group now | Alt+Shift+N |
65| Name the current group now | Alt+Shift+N |
66−| New tab in the current group | Alt+Shift+T |
67| Tidy now | unset |
66| Tidy now | unset |
68
67
69Change them at `brave://extensions/shortcuts`.
68Change them at `brave://extensions/shortcuts`.
@@ -95,7 +94,7 @@ Every push to `master` runs `.github/workflows/release.yml`: it typechecks, runs
95
94
96## Where this differs from the spec, and why
95## Where this differs from the spec, and why
97
96
98−- **New tab in group is Alt+Shift+T, not Alt+Cmd+T.** Chromium refuses to load an extension whose manifest suggests Alt+Command+T (it is treated as Ctrl+Alt, which is reserved for AltGr). You can still bind Alt+Cmd+T by hand at `brave://extensions/shortcuts` if Brave accepts it there.
97+- **No "new tab in group" shortcut.** The spec's Alt+Cmd+T command was dropped: grouping happens on its own through opener grouping, naming and Organize.
99- **Query strings.** The spec keeps the query only when the path is empty, but also wants `youtube.com/watch?v=…` kept. Diagonal keeps the whole query when the path is empty and otherwise keeps only content keys (`v`, `q`, `query`, `search_query`, `search`, `s`, `k`, `id`, `p`, `list`, `page`), dropping `utm_*` and similar.
98- **Query strings.** The spec keeps the query only when the path is empty, but also wants `youtube.com/watch?v=…` kept. Diagonal keeps the whole query when the path is empty and otherwise keeps only content keys (`v`, `q`, `query`, `search_query`, `search`, `s`, `k`, `id`, `p`, `list`, `page`), dropping `utm_*` and similar.
100- **Grey is reserved for the Parked group.** Site colours hash over the other eight colours.
99- **Grey is reserved for the Parked group.** Site colours hash over the other eight colours.
101- **Organize only adds tabs to Diagonal's own groups,** not to groups you made by hand, unless "Name my own groups" is on.
100- **Organize only adds tabs to Diagonal's own groups,** not to groups you made by hand, unless "Name my own groups" is on.
manifest.json−7
@@ -67,13 +67,6 @@
67 },
67 },
68 "tidy-now": {
68 "tidy-now": {
69 "description": "Run the tidy sweep now"
69 "description": "Run the tidy sweep now"
70− },
71− "new-tab-in-group": {
72− "suggested_key": {
73− "default": "Alt+Shift+T",
74− "mac": "Alt+Shift+T"
75− },
76− "description": "New tab inside the current group"
77 }
70 }
78 }
71 }
79}
72}
src/background/index.ts−16
@@ -470,20 +470,6 @@ async function nameGroupNow(groupId: number): Promise<void> {
470 await naming.nameNow(groupId);
470 await naming.nameNow(groupId);
471}
471}
472
472
473−async function newTabInGroup(): Promise<void> {
474− const active = await activeTab();
475− if (!active?.id) return;
476− const groupId = active.groupId ?? -1;
477− if (groupId === -1) {
478− await chrome.tabs.create({ windowId: active.windowId, index: active.index + 1 });
479− return;
480− }
481− const members = await chrome.tabs.query({ groupId });
482− const last = Math.max(...members.map((t) => t.index));
483− const tab = await chrome.tabs.create({ windowId: active.windowId, index: last + 1, openerTabId: active.id });
484− if (tab.id !== undefined) await addToGroup(rt, [tab.id], groupId);
485−}
486−
487chrome.commands.onCommand.addListener((command) => {
473chrome.commands.onCommand.addListener((command) => {
488 void (async () => {
474 void (async () => {
489 await ready;
475 await ready;
@@ -496,8 +482,6 @@ chrome.commands.onCommand.addListener((command) => {
496 if (t && (t.groupId ?? -1) !== -1) await nameGroupNow(t.groupId);
482 if (t && (t.groupId ?? -1) !== -1) await nameGroupNow(t.groupId);
497 } else if (command === "tidy-now") {
483 } else if (command === "tidy-now") {
498 await runSweep(rt, true);
484 await runSweep(rt, true);
499− } else if (command === "new-tab-in-group") {
500− await newTabInGroup();
501 }
485 }
502 } catch (e) {
486 } catch (e) {
503 logError(`command ${command}`, e);
487 logError(`command ${command}`, e);