From 12ab123f26c96975cf0dba9d27585cf94bc5712e Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Thu, 24 Dec 2015 01:50:57 -0500 Subject: [PATCH 1/4] More concise button module text --- index.html | 8 ++++---- ktane.css | 4 ++++ ktane.js | 12 ++++++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 9cdb9f7..fa28c44 100755 --- a/index.html +++ b/index.html @@ -45,11 +45,11 @@
- If holding the button and the strip colour is + If holding button, release when the timer contains the digit that corresponds to the strip colour:
diff --git a/ktane.css b/ktane.css index 1605c9e..e1b6729 100755 --- a/ktane.css +++ b/ktane.css @@ -130,6 +130,10 @@ nav { border-style: solid; border-width: 1px; } +#buttonInstruction { + background-color: #ddd; + padding: 0.5em; +} #sectionKeypads ul { display: inline-block; diff --git a/ktane.js b/ktane.js index c72c832..e036f29 100755 --- a/ktane.js +++ b/ktane.js @@ -163,20 +163,20 @@ $('section').each(function () { text = $('input[name="buttonText"]:checked').val(); if (text === 'Detonate') { - instruction = 'If there is more than 1 battery, press and release; otherwise, hold the button.' + instruction = 'If 2+ \ud83d\udd0b, press and release.
Otherwise, hold button.' } else if (colour === 'white') { - instruction = 'If there is a lit indicator with label CAR, hold the button. Otherwise, if there are more than 2 batteries and a lit indicator with label FRK, press and release the button. If neither apply, hold the button.' + instruction = 'If lit indicator [CAR], hold button.
Otherwise, if 3+ \ud83d\udd0b and lit indicator [FRK], press and release.
Otherwise, hold button.' } else if (colour === 'blue' && text === 'Abort' || colour === 'yellow') { - instruction = 'Hold the button.'; + instruction = 'Hold button.'; } else if (colour === 'red' && text === 'Hold') { - instruction = 'Press and release the button.'; + instruction = 'Press and release.'; } else { - instruction = 'If there are more than 2 batteries and a lit indicator with label FRK, press and release the button; otherwise, hold the button.'; + instruction = 'If 3+ \ud83d\udd0b and lit indicator [FRK], press and release the button.
Otherwise, hold button.'; } $instruction.html(instruction); - }); + }).triggerHandler('click'); })(); (function () { From b7748b97c850698e72bcd933554bdcbec9234116 Mon Sep 17 00:00:00 2001 From: The-Balthazar Date: Thu, 24 Dec 2015 15:25:03 +0000 Subject: [PATCH 2/4] Update ktane.css Lit indicator css style. --- ktane.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ktane.css b/ktane.css index e1b6729..f1d2f83 100755 --- a/ktane.css +++ b/ktane.css @@ -50,6 +50,16 @@ button { background-color: black; color: white; } +.litIndicator { + color: white; + border: 1px outset red; + text-shadow: 0px 0px 3px yellow,0px 0px 3px yellow; + background: black; + padding: 0 3px 3px; +} +.litIndicator:before { + content: '\2022\a0'; +} .button.white { border: 1px solid black; } From f8c3c9a327aa6d144d76cbdc9cc6aa59d6267145 Mon Sep 17 00:00:00 2001 From: The-Balthazar Date: Thu, 24 Dec 2015 15:28:01 +0000 Subject: [PATCH 3/4] Update ktane.js Lit indicator prettification. --- ktane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktane.js b/ktane.js index e036f29..111e669 100755 --- a/ktane.js +++ b/ktane.js @@ -165,7 +165,7 @@ $('section').each(function () { if (text === 'Detonate') { instruction = 'If 2+ \ud83d\udd0b, press and release.
Otherwise, hold button.' } else if (colour === 'white') { - instruction = 'If lit indicator [CAR], hold button.
Otherwise, if 3+ \ud83d\udd0b and lit indicator [FRK], press and release.
Otherwise, hold button.' + instruction = 'If CAR, hold button.
Otherwise, if 3+ \ud83d\udd0b and FRK, press and release.
Otherwise, hold button.' } else if (colour === 'blue' && text === 'Abort' || colour === 'yellow') { instruction = 'Hold button.'; From 22b962896ecaae182749783eced4237a4fd0850e Mon Sep 17 00:00:00 2001 From: The-Balthazar Date: Fri, 25 Dec 2015 22:59:09 +0000 Subject: [PATCH 4/4] Update ktane.js Missed a lit indicator. --- ktane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktane.js b/ktane.js index 111e669..fb5950d 100755 --- a/ktane.js +++ b/ktane.js @@ -172,7 +172,7 @@ $('section').each(function () { } else if (colour === 'red' && text === 'Hold') { instruction = 'Press and release.'; } else { - instruction = 'If 3+ \ud83d\udd0b and lit indicator [FRK], press and release the button.
Otherwise, hold button.'; + instruction = 'If 3+ \ud83d\udd0b and FRK, press and release the button.
Otherwise, hold button.'; } $instruction.html(instruction);