Skip to content

Commit

Permalink
github-deploy-action-improve-run-time-display
Browse files Browse the repository at this point in the history
  • Loading branch information
github-deploy-action committed Nov 25, 2024
1 parent 3e70be5 commit ebc6541
Show file tree
Hide file tree
Showing 36 changed files with 49,342 additions and 0 deletions.
5 changes: 5 additions & 0 deletions improve-run-time-display/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(rule
(copy ../main.bc.js hazel.js))

(rule
(copy ../worker.bc.js worker.js))
31,240 changes: 31,240 additions & 0 deletions improve-run-time-display/hazel.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions improve-run-time-display/img/hazelnut.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 improve-run-time-display/img/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions improve-run-time-display/img/noun-brochure-16464.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions improve-run-time-display/img/noun-brochure-26888.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions improve-run-time-display/img/noun-fold-1593402.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions improve-run-time-display/img/noun-fold-1593409.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions improve-run-time-display/img/noun-map-24173.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions improve-run-time-display/img/noun-map-6188938.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions improve-run-time-display/img/noun-pa-5383544.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions improve-run-time-display/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en" translate="no">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->

<title>hazel</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/svg" href = "img/hazelnut.svg">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
<link
href="https://fonts.googleapis.com/css?family=Material+Icons&display=swap"
rel="stylesheet"
/>

<!-- The current version of lit-html is broken so this overwrites it for the ninja-keys import. -->
<script type="importmap">
{
"imports": {
"https://unpkg.com/lit-html@latest/directives/ref.js?module": "https://unpkg.com/[email protected]/directives/ref.js?module"
}
}
</script>
<script type="module" src="ninja_module.js"></script>

</head>

<body spellcheck="false">
<div id="container">
<div class="loading">
<div class="spinner">
<img width="100px" height="100px" src="img/loading.gif" />
<img class="spinner-nut" width="100px" height="100px" src="img/hazelnut.svg" />
</div>
loading
</div>
</div>
</body>
<ninja-keys id="ninja-keys" placeholder="Find Action" hideBreadcrumbs></ninja-keys>

<script src="hazel.js"></script>
</html>
25 changes: 25 additions & 0 deletions improve-run-time-display/ninja_module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {NinjaKeys} from 'https://unpkg.com/ninja-keys?module';
import hotkeys from "https://unpkg.com/[email protected]?module"


// This is the default behavior for the hotkeys module but I'm overriding it for the clipboard-shim
hotkeys.filter = event => {
const target = event.target || event.srcElement;
const { tagName, id } = target;

// Override happening here
if(id == "clipboard-shim") {
return true;
}

let flag = true;
const isInput = tagName === 'INPUT' && !['checkbox', 'radio', 'range', 'button', 'file', 'reset', 'submit', 'color'].includes(target.type);
// ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select>
if (
target.isContentEditable
|| ((isInput || tagName === 'TEXTAREA' || tagName === 'SELECT') && !target.readOnly)
) {
flag = false;
}
return flag;
};
Loading

0 comments on commit ebc6541

Please sign in to comment.