-
Notifications
You must be signed in to change notification settings - Fork 1
/
results.html
1 lines (1 loc) · 1.88 KB
/
results.html
1
<!DOCTYPE html><html lang="en-US"><head><title>4Orbs</title><link href="./style.css" rel="stylesheet" type="text/css"><link rel="icon" type="image/png" sizes="48x48" href="/4orbs/assets/icon-48px.png"><link rel="icon" type="image/png" sizes="96x96" href="/4orbs/assets/icon-96px.png"><link rel="icon" type="image/svg+xml" href="/4orbs/assets/icon.svg"><link rel="shortcut icon" type="image/svg+xml" href="/4orbs/assets/icon.svg"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="theme-color" content="" data-react-helmet="true"><meta property="og:ttl" content="60"><meta property="og:type" content="website"><meta property="og:site_name" content="theghostofinky.github.io/4orbs"><meta property="og:url" content="https://theghostofinky.github.io/4orbs/"><meta property="og:description" content="A political quiz with your results in Orbs"><meta property="og:image" content="https://theghostofinky.github.io/4orbs/assets/icon-512px.png"><meta property="og:image:width" content="512"><meta property="og:image:height" content="512"></head><body><h1>4Orbs</h1><hr><h1>Results</h1><canvas id="orb-canvas"></canvas><button id="download-button">Download your results</button><a href="custom.html"><button>Make your custom score</button></a><a href="index.html"><button>Return to the start</button></a><script type="module">import{Orbs as o,cleanUrl as e,scoreParser as n,loadJson as t}from"./dist/commons.min.js";const a=new Promise((o=>{window.addEventListener("load",(()=>{o()}))})),[d,i]=await Promise.all([t("params"),a]),s=document.getElementById("orb-canvas"),l=new o(s,d),[r,m]=n.decode(window.location.search.substring(1)),c=Object.fromEntries(d.axes.map(((o,e)=>[o,m[e]]))),w={title:document.title,url:e(window.location,"results"),version:d.version,edition:r};l.drawAll(w,c),document.getElementById("download-button").onclick=()=>{o.downloadCanvas(s)};</script></body></html>