commit: cb7e8f563af7f72057767cef1f0b858096bf8c1a
parent e4505d3985a6abe2647d0fd87e92297be419f986
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 12 Dec 2019 11:02:31 -0500
*
Diffstat:
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/index.html b/index.html
@@ -51,9 +51,10 @@
</head>
<body>
<script>
+ console.clear()
+ console.log('Starting..')
const runic = new Runic(runicLibrary)
-
- let RIVEN = new Riven();
+ const RIVEN = new Riven();
graph()
// Find missing ingredients
diff --git a/scripts/helpers.js b/scripts/helpers.js
@@ -36,4 +36,4 @@ function Š (target) {
if (!elem) { console.error('Undefined jump target', target); return }
elem.scrollIntoView()
elem.focus()
-}-
\ No newline at end of file
+}
diff --git a/scripts/nodes/query.js b/scripts/nodes/query.js
@@ -49,3 +49,10 @@ window.addEventListener('hashchange', detectBackOrForward(
function () { console.log('back'); Ø('query').bang() },
function () { console.log('forward'); Ø('query').bang() }
))
+
+document.addEventListener('click', (e) => {
+ if (e.target.getAttribute('href')) {
+ Ø('query').bang(e.target.getAttribute('href'))
+ e.preventDefault()
+ }
+})
diff --git a/scripts/templates/recipe.js b/scripts/templates/recipe.js
@@ -65,7 +65,7 @@ function RecipeTemplate (id, rect) {
for (const cat in recipe.INGR) {
for (const id in recipe.INGR[cat]) {
- if (all_ingredients[id].WARN) {
+ if (all_ingredients[id] && all_ingredients[id].WARN) {
const warn = all_ingredients[id].WARN
html += `
<section id='warn'>