@@ -217,22 +217,6 @@ async function changeActiveGroupBy(offset) {
217217 await toggleVisibleTabs ( activeGroup , true ) ;
218218}
219219
220- async function triggerCommand ( command ) {
221- const options = await loadOptions ( ) ;
222-
223- if ( options . shortcut [ command ] . disabled ) {
224- // Doesn't execute disabled command
225- return ;
226- }
227- if ( command === 'activate-next-group' ) {
228- await changeActiveGroupBy ( 1 ) ;
229- } else if ( command === 'activate-previous-group' ) {
230- await changeActiveGroupBy ( - 1 ) ;
231- } else if ( command === "toggle-panorama-view" ) {
232- await toggleView ( ) ;
233- }
234- }
235-
236220/** Open the Panorama View tab, or return to the last open tab if Panorama View is currently open */
237221async function toggleView ( ) {
238222 const extTabs = await browser . tabs . query ( { url : browser . extension . getURL ( 'view.html' ) , currentWindow : true } ) ;
@@ -258,6 +242,22 @@ async function toggleView() {
258242 }
259243}
260244
245+ async function triggerCommand ( command ) {
246+ const options = await loadOptions ( ) ;
247+
248+ if ( options . shortcut [ command ] . disabled ) {
249+ // Doesn't execute disabled command
250+ return ;
251+ }
252+ if ( command === 'activate-next-group' ) {
253+ await changeActiveGroupBy ( 1 ) ;
254+ } else if ( command === 'activate-previous-group' ) {
255+ await changeActiveGroupBy ( - 1 ) ;
256+ } else if ( command === "toggle-panorama-view" ) {
257+ await toggleView ( ) ;
258+ }
259+ }
260+
261261/** Callback function which will be called whenever a tab is opened */
262262async function tabCreated ( tab ) {
263263 if ( window . backgroundState . openingBackup ) {
0 commit comments