simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Mar 22 22:55:09 GMT 2023


TL;DR:
  2557446 KaiOS: be more careful detecting the presence of KaiAds

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2023-03-22 22:55:09

commit 255744676c0c4c8fa391d7a03bdd3142d6db0ad2
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=255744676c0c4c8fa391d7a03bdd3142d6db0ad2;hp=b66a38bbdc4405cce7050b8e8bbcae8d69c3dc2c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Wed Mar 22 22:54:08 2023 +0000

    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.

 kaios/kaiads-glue.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the tartarus-commits mailing list