VulpesOS/gaia/tv_apps/smart-system/js/browser.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

28 lines
655 B
JavaScript
Executable file

/* 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);
}());