Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
28
gaia/tv_apps/smart-system/js/browser.js
Executable file
28
gaia/tv_apps/smart-system/js/browser.js
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
/* global UrlHelper, AppWindow, BrowserConfigHelper */
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
function handleOpenUrl(url) {
|
||||
var config = new BrowserConfigHelper({url: url});
|
||||
config.oop = true;
|
||||
var newApp = new AppWindow(config);
|
||||
|
||||
newApp.requestOpen();
|
||||
}
|
||||
|
||||
function handleActivity(activity) {
|
||||
// Activities can send multiple names, right now we only handle
|
||||
// one so we only filter on types
|
||||
var data = activity.source.data;
|
||||
switch (data.type) {
|
||||
case 'url':
|
||||
handleOpenUrl(UrlHelper.getUrlFromInput(data.url));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
window.navigator.mozSetMessageHandler('activity', handleActivity);
|
||||
|
||||
}());
|
||||
Loading…
Reference in a new issue