<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puzzles/kaios, branch master</title>
<subtitle>My sgt-puzzles tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/'/>
<entry>
<title>KaiOS: set show-labels=true in preferences for Guess</title>
<updated>2023-08-21T22:06:39+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-08-21T21:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=7c105846b6d35cb979314f5c5fa4336d6e1a11ac'/>
<id>7c105846b6d35cb979314f5c5fa4336d6e1a11ac</id>
<content type='text'>
On a device with a phone keypad, driving Guess by typing numbers rather
than using the arrow keys seems natural.  But if you're going to do
that, showing the labels makes it a lot easier.  KaiOS doesn't have any
way for the user to control this, so we should default to the friendlier
state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a device with a phone keypad, driving Guess by typing numbers rather
than using the arrow keys seems natural.  But if you're going to do
that, showing the labels makes it a lot easier.  KaiOS doesn't have any
way for the user to control this, so we should default to the friendlier
state.
</pre>
</div>
</content>
</entry>
<entry>
<title>KaiOS: be more careful detecting the presence of KaiAds</title>
<updated>2023-03-22T22:54:19+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-03-22T22:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=255744676c0c4c8fa391d7a03bdd3142d6db0ad2'/>
<id>255744676c0c4c8fa391d7a03bdd3142d6db0ad2</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Turn on PUZZLES_SHOW_CURSOR on KaiOS</title>
<updated>2023-03-22T17:59:14+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-03-22T17:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=b66a38bbdc4405cce7050b8e8bbcae8d69c3dc2c'/>
<id>b66a38bbdc4405cce7050b8e8bbcae8d69c3dc2c</id>
<content type='text'>
Most KaiOS devices are primarily keyboard-based, so this seems like a
reasonable approach.

I've also switched to specifying boolean values as JSON booleans because
that works now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most KaiOS devices are primarily keyboard-based, so this seems like a
reasonable approach.

I've also switched to specifying boolean values as JSON booleans because
that works now.
</pre>
</div>
</content>
</entry>
<entry>
<title>KaiOS: be more cautious about determining whether KaiAds is present</title>
<updated>2023-03-01T22:17:16+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-03-01T22:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=c0f715fbaca77fbb6e86de604098d82687bdea48'/>
<id>c0f715fbaca77fbb6e86de604098d82687bdea48</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move KaiAds menu option</title>
<updated>2023-01-23T23:50:39+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-01-23T23:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=1f72a1a2ecc89ba789a0b665a5e39da5febe27d2'/>
<id>1f72a1a2ecc89ba789a0b665a5e39da5febe27d2</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>KaiOS: explicitly set the font family to Open Sans</title>
<updated>2023-01-23T01:09:08+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-01-23T01:09:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=31badae3c12d71857ad0a327f8e05af24fb92648'/>
<id>31badae3c12d71857ad0a327f8e05af24fb92648</id>
<content type='text'>
This means that you'll get the right font if you one the app page on a
desktop browser (assuming you have Open Sans installed).  Also my
Nokia 800 Tough seems to default to a different font (maybe Noto
Sans?) and I'd prefer to have the same font everywhere.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This means that you'll get the right font if you one the app page on a
desktop browser (assuming you have Open Sans installed).  Also my
Nokia 800 Tough seems to default to a different font (maybe Noto
Sans?) and I'd prefer to have the same font everywhere.
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase KaiAds timeout to 10 seconds</title>
<updated>2023-01-22T16:15:27+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-01-22T16:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=890b004acd45b193a6453bc5e00e375aca2d9fb8'/>
<id>890b004acd45b193a6453bc5e00e375aca2d9fb8</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a content security policy for the KaiOS app</title>
<updated>2023-01-21T13:37:45+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-01-21T13:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=667ce177294e0b4c4331c2af2bdc96ee9631fbf2'/>
<id>667ce177294e0b4c4331c2af2bdc96ee9631fbf2</id>
<content type='text'>
This is for defence in depth against security holes either in Puzzles or
in the KaiAds API.  I haven't found any documentation of what KaiAds'
CSP requirements are, but allowing scripts and frames from *.kaiads.com
seems to be enough to let the test adverts work.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is for defence in depth against security holes either in Puzzles or
in the KaiAds API.  I haven't found any documentation of what KaiAds'
CSP requirements are, but allowing scripts and frames from *.kaiads.com
seems to be enough to let the test adverts work.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update comment in manifest.pl based on experience</title>
<updated>2023-01-21T13:37:09+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2023-01-21T13:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=eb366cb6c6c0dd23be392afaa280e97d4b9d966c'/>
<id>eb366cb6c6c0dd23be392afaa280e97d4b9d966c</id>
<content type='text'>
As far as I can tell, the KaiStore is quite happy with YY.MM.DD version
numbers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As far as I can tell, the KaiStore is quite happy with YY.MM.DD version
numbers.
</pre>
</div>
</content>
</entry>
<entry>
<title>kaios/manifest.pl: canonicalise the JSON output.</title>
<updated>2023-01-21T11:58:44+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-01-21T11:57:13+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=eac7fc1665ef07c4a8b009521034043ce6b422e7'/>
<id>eac7fc1665ef07c4a8b009521034043ce6b422e7</id>
<content type='text'>
The default behaviour of JSON::PP's encode_json output is to write the
keys of a hash in Perl's natural hash order, which isn't consistent
between runs of the same script due to hash function randomisation.
This causes my build system to complain when successive builds from
the same source revision don't produce the same output.

Easily fixed: JSON::PP already has a switch to ensure consistent
ordering, it's just a matter of finding it and turning it on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default behaviour of JSON::PP's encode_json output is to write the
keys of a hash in Perl's natural hash order, which isn't consistent
between runs of the same script due to hash function randomisation.
This causes my build system to complain when successive builds from
the same source revision don't produce the same output.

Easily fixed: JSON::PP already has a switch to ensure consistent
ordering, it's just a matter of finding it and turning it on.
</pre>
</div>
</content>
</entry>
</feed>
