Merge branch 'master' into simon
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@
|
||||
</section>
|
||||
|
||||
<section id="sectionDisplay">
|
||||
<h2>Display</h2>
|
||||
<h2>Who's on First</h2>
|
||||
|
||||
<dl id="displayList">
|
||||
<dt> </dt> <dd>bottom-left</dd>
|
||||
|
||||
@@ -282,7 +282,7 @@ $('.jsResetSection').on('click', function () {
|
||||
steak: '3.582',
|
||||
sting: '3.592',
|
||||
vector: '3.595',
|
||||
beats: '3.600'
|
||||
beats: '3.600'
|
||||
},
|
||||
codes = {
|
||||
'.-': 'a',
|
||||
@@ -302,7 +302,7 @@ $('.jsResetSection').on('click', function () {
|
||||
'...': 's',
|
||||
'-': 't',
|
||||
'...-': 'v',
|
||||
'-..-': 'x'
|
||||
'-..-': 'x'
|
||||
},
|
||||
codeRegex = new RegExp(' *(' + Object.keys(codes).join('|').replace(/\./g, '\\.') + ')(?![\.-]) *', 'g'),
|
||||
$rows = {},
|
||||
@@ -311,7 +311,7 @@ $('.jsResetSection').on('click', function () {
|
||||
for (var word in freqs) {
|
||||
var $row = $('<tr><td>' + word + '</td><td>' + freqs[word] + '</td></tr>');
|
||||
$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 () {
|
||||
@@ -325,7 +325,7 @@ $('.jsResetSection').on('click', function () {
|
||||
regexes.push(new RegExp(
|
||||
line.replace(codeRegex, codeRegexCallback)
|
||||
.replace(codeRegex, codeRegexCallback)
|
||||
));
|
||||
));
|
||||
});
|
||||
console.log(regexes);
|
||||
|
||||
@@ -334,17 +334,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 () {
|
||||
|
||||
Reference in New Issue
Block a user