VulpesOS/gaia/tv_apps/pocket/js/pocket.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

25 lines
588 B
JavaScript
Executable file

'use strict';
navigator.mozApps.getSelf().onsuccess = function(evt) {
var selfApp = evt.target.result;
var iacmsg = {
type: 'view',
data: {
type: 'url',
url: 'https://getpocket.com/',
}
};
selfApp.connect('webpage-open').then(function (ports) {
ports.forEach(function(port) {
port.postMessage(iacmsg);
});
// XXX: smart-system application opening transition would failed,
// if the application exit quickly. Bug 1208414 would be use to
// trace this issue.
setTimeout(function(){
self.close();
}, 1500);
});
};