5 Commits

Author SHA1 Message Date
255744676c KaiOS: be more careful detecting the presence of KaiAds
Now that we catch JavaScript errors and report them to the user, I could
tell that the way we were detecting the presence of getKaiAd() didn't
work because it caused an alert every time a build without KaiAds was
started.  Detecting the presence of a global variable is slightly
tricky, but explicitly looking for it on "window" works and isn't very
ugly.
2023-03-22 22:54:19 +00:00
c0f715fbac KaiOS: be more cautious about determining whether KaiAds is present
Just checking for the getKaiAd() function by doing "if (!getKaiAd ..."
throws a ReferenceError if it's not defined, and now my error box
catches that.  Using "if (getKaiAd === undefined ..." seems to be
acceptable, though.
2023-03-01 22:17:16 +00:00
1f72a1a2ec Move KaiAds menu option
It's a bit of a nuisance at the moment if you're trying to get to the
documentation by pressing the up arrow, so I've moved it above the
documentation links, which is where I keep expecting to find it.  I
probably want to do some larger-scale menu re-organisation on KaiOS,
though.
2023-01-23 23:50:39 +00:00
890b004acd Increase KaiAds timeout to 10 seconds
Kai recommend five to ten seconds, and five seconds is short enough
that I get timeouts when testing that are hard to distinguish from
having screwed up my content security policy.
2023-01-22 16:15:27 +00:00
860d79c874 kaios: Add hooks for the KaiAds API
The Kai Store makes display of advertisements provided by the KaiAds API
mandatory.  I don't want such adverts to be inconvenient for the users,
so I've just gone for adding a menu item that will display one.  This is
probably a little too crude, but it's good for testing things.

The actual KaiAds API code is not free software, so it's not included
here.  My intention is to add it by hand to the Zip files for Kai Store
uploads.  Without it, the advertising code does nothing.
2023-01-19 20:34:48 +00:00