From 756ae89a51971248dee3474f5792173e75918c4e Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Mon, 30 Nov 2015 01:15:06 -0500 Subject: [PATCH 1/2] Replace carriage returns (how did those randomly get in there?) --- ktane.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ktane.js b/ktane.js index 45c63aa..3817ccd 100755 --- a/ktane.js +++ b/ktane.js @@ -266,7 +266,7 @@ $('.jsResetSection').on('click', function () { steak: '3.582', sting: '3.592', vector: '3.595', - beats: '3.600' + beats: '3.600' }, codes = { '.-': 'a', @@ -286,7 +286,7 @@ $('.jsResetSection').on('click', function () { '...': 's', '-': 't', '...-': 'v', - '-..-': 'x' + '-..-': 'x' }, codeRegex = new RegExp(' *(' + Object.keys(codes).join('|').replace(/\./g, '\\.') + ')(?![\.-]) *', 'g'), $rows = {}, @@ -295,7 +295,7 @@ $('.jsResetSection').on('click', function () { for (var word in freqs) { var $row = $('' + word + '' + freqs[word] + ''); $table.append($row); - $rows[word + word] = $row; // Concat to handle the wrap around + $rows[word + word] = $row; // Concat to handle the wrap around } $('#morseInput').on('keyup', function () { @@ -309,7 +309,7 @@ $('.jsResetSection').on('click', function () { regexes.push(new RegExp( line.replace(codeRegex, codeRegexCallback) .replace(codeRegex, codeRegexCallback) - )); + )); }); console.log(regexes); @@ -318,17 +318,17 @@ $('.jsResetSection').on('click', function () { $.each(regexes, function (i, regex) { if (!regex.test(word)) { matchAll = false; - return false; - } + return false; + } }); - $rows[word].toggleClass('inactive', !matchAll); - } + $rows[word].toggleClass('inactive', !matchAll); + } }); function codeRegexCallback(match, code) { - return codes[code]; - } + return codes[code]; + } })(); (function () { From 75a4e173b2ff12bc35babac2c54b0f1ab2d1d1d3 Mon Sep 17 00:00:00 2001 From: Daniel Sinn Date: Mon, 30 Nov 2015 01:15:57 -0500 Subject: [PATCH 2/2] Rename heading to "Who's on First" for less confusion --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7a4e456..094b1d9 100755 --- a/index.html +++ b/index.html @@ -51,7 +51,7 @@
-

Display

+

Who's on First

 
bottom-left