Skip to content

Commit

Permalink
Merge pull request #1 from RealDekkia/master
Browse files Browse the repository at this point in the history
why does vs code insist on calling its branch 'master'?
  • Loading branch information
RealDekkia authored Feb 1, 2024
2 parents fc217ad + ba9e09e commit 67df8b8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
8 changes: 8 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
body {
grid-template-columns: 1fr min(100rem, 90%) 1fr;
}

#decryptionBox input {
width: 2.5rem;
text-align: center;
}

#decryptionBox .inSubFocus {
color: var(--code);
}

#decryptionBox input:active,
#decryptionBox input:focus,
#decryptionBox input:focus-visible,
Expand Down
22 changes: 20 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function processInputData() {
function unfocusAll() {
Array.from(document.getElementsByTagName("input")).forEach(d => {
d.classList.remove("infocus");
d.classList.remove("inSubFocus");
});
}

Expand Down Expand Up @@ -134,12 +135,29 @@ function createLetterInputBoxesFromText(txt, enabled) {

charBox1.value = char;

charBox2.onclick = function () {
//non-letter chars are always the same
const regex = /^[a-z]+$/i;
if (!regex.test(char)) {
charBox2.value = char;
charBox2.disabled = true;
}

charBox2.onfocus = function () {
unfocusAll();
//search and style all boxes with the same letter
Array.from(document.getElementsByTagName("input")).forEach(d => {
if (!d.classList.contains("inputField")) {
if (d.value.toUpperCase() == char.toUpperCase()) {
d.classList.add("inSubFocus");
}
}
});

//style for boxe above
charBox1.classList.add("infocus");
}

charBox2.onchange = function () {
charBox2.oninput = function () {
charLookup[char.toUpperCase()] = charBox2.value;
updateInputsFromCharLookup();
}
Expand Down
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Improbable Island Decryption Notepad (IIDN)

I created this tool to break the Substitution cipher used on https://www.improbableisland.com.

The goal is to keep the fun of cracking the cipher by hand while getting rid of the tedious task of constantly going over your text and replacing characters every time you found one.

This could be done on a piece of paper (or in a notepad) with a bit more time-investment.

This tool could also be used for educational stuff if you wanted to.

I even made a subdomain for it: https://paper.doesnotcut.it

0 comments on commit 67df8b8

Please sign in to comment.