comparison background.js @ 17:6b4680867e49

Remove incorrect specification of the tab position when creating new tabs The index parameter of browser.tabs.create() does not accept -1, leaving it out adds the newly created tab on the rightmost position as intended (bug reported by Daniele).
author Guido Berhoerster <guido+tab-mover@berhoerster.name>
date Thu, 31 May 2018 12:57:40 +0200
parents e32b90567f39
children 4704e5216412
comparison
equal deleted inserted replaced
16:1e7567327f1b 17:6b4680867e49
379 } else { 379 } else {
380 // open the URL of the current tab in the destination window 380 // open the URL of the current tab in the destination window
381 browser.tabs.create({ 381 browser.tabs.create({
382 url: tab.url, 382 url: tab.url,
383 windowId, 383 windowId,
384 index: -1
385 }).then(newTab => { 384 }).then(newTab => {
386 // close the current tab 385 // close the current tab
387 return browser.tabs.remove(tab.id); 386 return browser.tabs.remove(tab.id);
388 }).then(() => { 387 }).then(() => {
389 // get the new title of the destination window 388 // get the new title of the destination window