aboutsummaryrefslogtreecommitdiff
path: root/kaios/kaiads-glue.js (follow)
Commit message (Collapse)AuthorAge
* KaiOS: be more careful detecting the presence of KaiAdsBen Harris2023-03-22
| | | | | | | | | 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.
* KaiOS: be more cautious about determining whether KaiAds is presentBen Harris2023-03-01
| | | | | | | 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.
* Move KaiAds menu optionBen Harris2023-01-23
| | | | | | | | 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.
* Increase KaiAds timeout to 10 secondsBen Harris2023-01-22
| | | | | | 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.
* kaios: Add hooks for the KaiAds APIBen Harris2023-01-19
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.