Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kherrick committed Feb 28, 2025
0 parents commit 8b4b7a2
Show file tree
Hide file tree
Showing 713 changed files with 138,950 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
17 changes: 17 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<title>apps - redirect service</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="apps - redirect service" />
<meta
http-equiv="refresh"
content="0;url=https://kherrick.github.io/apps/"
/>
<script>
location.replace("https://kherrick.github.io/apps/");
</script>
</head>
<body></body>
</html>
48 changes: 48 additions & 0 deletions about/index.html

Large diffs are not rendered by default.

Binary file added assets/icons/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions assets/images/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
61 changes: 61 additions & 0 deletions assets/minimal-c-sharp-wasm/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { clear } from "./utils.js";
import { getAssemblyExports } from "./main.js";
import {
handleCalculatorButtons,
handleCalculatorValue,
handleKeydownAndPaste,
} from "./eventHandlers.js";

// result element
const result = document.getElementById("result");

// setup model for calculator
const model = {
numbers: {
first: "",
second: "",
},
operation: "",
};

// define placeholder for instance of C# calculator
let Calculator = null;

// set C# calculator
getAssemblyExports().then((assemblyExports) => {
Calculator = assemblyExports.Calculator;
});

// clear the calculator on first load
clear(model, result);

// setup event handlers for paste and keydown
document.body.addEventListener("keydown", (e) =>
handleKeydownAndPaste(Calculator, model, result, e)
);
result.addEventListener("keydown", (e) => {
// prevent modifying the results directly
if (e.key !== "Tab") {
e.preventDefault();
}
});
result.addEventListener("beforeinput", (e) => {
// check insertFromPaste using beforeinput
if (e.inputType === "insertFromPaste") {
handleKeydownAndPaste(Calculator, model, result, e);
}
});

// setup event handlers for clicking buttons
document.querySelectorAll("input[type=button]").forEach((button) => {
// need both click and keydown to differentiate between space and enter
button.addEventListener("click", (e) =>
handleCalculatorButtons(Calculator, model, result, e, button)
);
button.addEventListener("keydown", (e) =>
handleCalculatorButtons(Calculator, model, result, e, button)
);
});

// focus clear button
document.querySelector("[value='c']").focus();
Loading

0 comments on commit 8b4b7a2

Please # to comment.