Widget: Compass: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 608: | Line 608: | ||
const handler = event => { | const handler = event => { | ||
const answerId = event.currentTarget.id; | |||
const actions = actions[answerId]; | |||
if (!actions) return; | |||
if (answerId.indexOf('tech') !== -1) { | |||
// Action takes us to Tech Library | |||
const str = JSON.stringify(actions); | |||
const enc = btoa(encodeURIComponent(str)) | |||
console.log(enc) | |||
} | |||
} | } | ||
document.querySelectorAll('.choice').forEach(el => | document.querySelectorAll('.choice').forEach(el => el.addEventListener('click', handler, { passive: true })); | ||
</script> | </script> | ||
</includeonly> | </includeonly> |
Revision as of 13:06, 24 November 2022
Development version of the Compass.
Not ready for production!