Skip to content

Instantly share code, notes, and snippets.

@lewdev
Last active August 12, 2022 02:05
Show Gist options
  • Select an option

  • Save lewdev/35892d541c4e06aca5487c9a2380c799 to your computer and use it in GitHub Desktop.

Select an option

Save lewdev/35892d541c4e06aca5487c9a2380c799 to your computer and use it in GitHub Desktop.
🏈 Scoreboard in your address bar

🏈 Scoreboard in your address bar (625b)

Copy-paste the following code into your address bar or a bookmarklet for access to an instant scoreboard.

  • Add, Subtract, & Reset scores
  • Hover top & bottom areas of the screen to reveal buttons
  • Apply names to each side (additional fields below using Tab)
  • Font size adjusts to the screen
data:text/html,<style>.r{width:100%;opacity:0}.r:hover{opacity:1}*{box-sizing:border-box;margin:0}div,input{border:0;width:50%;display:inline-block}input{text-align:center;font-size:8vh;color:gray}button{width:25%;font-size:5vh}</style><body onload="a=b=0;r=_=>o.innerHTML=''+[a,b].map((n,i)=>`<div style=margin-top:-10vh;font:20vw/75vh'arial>${n}</div>`).join``+'<p class=r>'+[0,1,2,3].map(i=>`<button onclick='${i<2?'a':'b'}+=${i%2?'':'-'}1;r()'>${i%2?'+':'-'}</button>`).join``+'<br>';r()"><button onclick="a=b=0;r()" class=r>Reset</button><input type=text value=A><input type=text value=B><input type=text><input type=text><center id=o>
data:text/html,<style>.r{width:100%;opacity:0}.r:hover{opacity:1}*{box-sizing:border-box;margin:0}div,input{border:0;width:50%;display:inline-block}input{text-align:center;font-size:8vh;color:gray}button{width:25%;font-size:5vh}</style><body onload="a=b=0;r=_=>o.innerHTML=''+[a,b].map((n,i)=>`<div style=font:20vw/74vh'arial>${n}</div>`).join``+'<p class=r>'+[0,1,2,3].map(i=>`<button onclick='${i<2?'a':'b'}+=${i%2?'':'-'}1;r()'>${i%2?'+':'-'}</button>`).join``+'<br>';r()"><button onclick="a=b=0;r()"class=r>Reset</button><input type=text value=A><input type=text value=B><center id=o>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment