let getManifest = function (callback) {
if (!navigator.mozApps) {
let t = document.getElementById("kaisos-ads");
t.remove();
return false;
}
let self = navigator.mozApps.getSelf();
self.onsuccess = function () {
callback(self.result);
};
self.onerror = function () {};
};
//call function
getManifest(manifest);
//callback
//for example use version number
//or show/hidde ads
let manifest = function(a) {
document.getElementById("intro-footer").innerText =
"O.MAP Version " + a.manifest.version;
if (a.installOrigin == "app://kaios-plus.kaiostech.com") {
general.ads = true;
} else {
let t = document.getElementById("kaisos-ads");
t.remove();
}
}