Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
25 lines
588 B
JavaScript
Executable file
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);
|
|
});
|
|
};
|