| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 if (!win.incognito) | 512 if (!win.incognito) |
| 513 queryInfo.windowId = win.id; | 513 queryInfo.windowId = win.id; |
| 514 | 514 |
| 515 chrome.tabs.query(queryInfo, function(tabs) | 515 chrome.tabs.query(queryInfo, function(tabs) |
| 516 { | 516 { |
| 517 if (tabs.length > 0) | 517 if (tabs.length > 0) |
| 518 { | 518 { |
| 519 var tab = tabs[0]; | 519 var tab = tabs[0]; |
| 520 | 520 |
| 521 chrome.windows.update(tab.windowId, {focused: true}); | 521 chrome.windows.update(tab.windowId, {focused: true}); |
| 522 chrome.tabs.highlight( | 522 chrome.tabs.update(tab.id, {active: true}); |
| 523 { | |
| 524 windowId: tab.windowId, | |
| 525 tabs: [tab.index] | |
| 526 }, | |
| 527 function() {} | |
| 528 ); | |
| 529 | 523 |
| 530 if (callback) | 524 if (callback) |
| 531 callback(new Page(tab)); | 525 callback(new Page(tab)); |
| 532 } | 526 } |
| 533 else | 527 else |
| 534 { | 528 { |
| 535 ext.pages.open(optionsUrl, callback); | 529 ext.pages.open(optionsUrl, callback); |
| 536 } | 530 } |
| 537 }); | 531 }); |
| 538 }); | 532 }); |
| 539 }; | 533 }; |
| 540 })(); | 534 })(); |
| OLD | NEW |