| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 30 matching lines...) Expand all Loading... |
| 41 var frames = framesOfTabs[this._id]; | 41 var frames = framesOfTabs[this._id]; |
| 42 if (frames) | 42 if (frames) |
| 43 { | 43 { |
| 44 var frame = frames[0]; | 44 var frame = frames[0]; |
| 45 if (frame) | 45 if (frame) |
| 46 return frame.url; | 46 return frame.url; |
| 47 } | 47 } |
| 48 }, | 48 }, |
| 49 activate: function() | 49 activate: function() |
| 50 { | 50 { |
| 51 chrome.tabs.update(this._id, {selected: true}); | 51 chrome.tabs.update(this._id, {highlighted: true}); |
| 52 }, | 52 }, |
| 53 sendMessage: function(message, responseCallback) | 53 sendMessage: function(message, responseCallback) |
| 54 { | 54 { |
| 55 chrome.tabs.sendMessage(this._id, message, responseCallback); | 55 chrome.tabs.sendMessage(this._id, message, responseCallback); |
| 56 } | 56 } |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 ext.pages = { | 59 ext.pages = { |
| 60 open: function(url, callback) | 60 open: function(url, callback) |
| 61 { | 61 { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (!win.incognito) | 404 if (!win.incognito) |
| 405 queryInfo.windowId = win.id; | 405 queryInfo.windowId = win.id; |
| 406 | 406 |
| 407 chrome.tabs.query(queryInfo, function(tabs) | 407 chrome.tabs.query(queryInfo, function(tabs) |
| 408 { | 408 { |
| 409 if (tabs.length > 0) | 409 if (tabs.length > 0) |
| 410 { | 410 { |
| 411 var tab = tabs[0]; | 411 var tab = tabs[0]; |
| 412 | 412 |
| 413 chrome.windows.update(tab.windowId, {focused: true}); | 413 chrome.windows.update(tab.windowId, {focused: true}); |
| 414 chrome.tabs.update(tab.id, {selected: true}); | 414 chrome.tabs.update(tab.id, {highlighted: true}); |
| 415 | 415 |
| 416 if (callback) | 416 if (callback) |
| 417 callback(new Page(tab)); | 417 callback(new Page(tab)); |
| 418 } | 418 } |
| 419 else | 419 else |
| 420 { | 420 { |
| 421 ext.pages.open(optionsUrl, callback); | 421 ext.pages.open(optionsUrl, callback); |
| 422 } | 422 } |
| 423 }); | 423 }); |
| 424 }); | 424 }); |
| 425 }; | 425 }; |
| 426 })(); | 426 })(); |
| OLD | NEW |