moved some chromium-specific code into chromium.js (using extension.navigator namespace)
This commit is contained in:
parent
cf35b7056f
commit
69ba6581b0
3 changed files with 22 additions and 4 deletions
|
@ -14,6 +14,24 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
window.extension = window.extension || {};
|
||||
|
||||
window.extension.navigator = function() {
|
||||
var self = {};
|
||||
|
||||
var tabs = {};
|
||||
tabs.create = function(url){
|
||||
chrome.tabs.create({url: url});
|
||||
};
|
||||
self.tabs = tabs;
|
||||
|
||||
self.setBadgeText = function(text){
|
||||
chrome.browserAction.setBadgeText({text: text + ""});
|
||||
};
|
||||
|
||||
return self;
|
||||
}();
|
||||
|
||||
// Random shared utilities that are used only by chromium things
|
||||
|
||||
function registrationDone() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue