moved some chromium-specific code into chromium.js (using extension.navigator namespace)

This commit is contained in:
Marco 2014-05-27 23:12:14 +02:00
parent cf35b7056f
commit 69ba6581b0
3 changed files with 22 additions and 4 deletions

View file

@ -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() {