Skip to content

Instantly share code, notes, and snippets.

@FelixWolf
Created February 24, 2020 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FelixWolf/85e7422ac3d3d4398dd4ba18a4cb7eca to your computer and use it in GitHub Desktop.
Save FelixWolf/85e7422ac3d3d4398dd4ba18a4cb7eca to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style>
/* stolen button code from slapi.js */
button{
color:#f5f5f5;
background:linear-gradient(to bottom, #0c3443 0%,#0e232c 100%);
border-radius:3px;
border:1px solid #101010;
box-shadow:0px 1px 0px 0px rgba(29, 42, 46,0.75);
height:26px;
display:inline-flex;
align-content: center;
}
button.active{
border:1px solid #053a4e;
box-shadow:0px 0px 1px 1px #105f7c;
background:linear-gradient(to bottom,#04526d 0%,#064258 100%);
}
button.inactive{
filter: grayscale(75%);
}
</style>
</head>
<body>
<div style="width:305px;height:237px;border-radius:4px;padding:10px;background:#202020;font-size:13px;">
<div style="font-weight:bold;color:#ffd9ba;">The object 'super griff' wants access to take money from your Linden Dollar account. If you allow this, it can take any or all of your money from you at any time, with no further warning or request.<br/><br/>Before allowing this, make sure that you know what the object is and why it is making this request, as well as whether you trust the creator. If you're not certain, click Deny.</div><br/>
<div><button id="test" class="inactive">Allow access (10)</button> <button class="active">Deny</button></div>
</div>
<button id="poo">Start demo 2.5 second delay</button>
<script>
poo.onclick = function(){
setTimeout(function(){
var i = 10;
setInterval(function(){
if(i > 0){
test.textContent = `Allow access (${i})`;
}else{
test.textContent = `Allow access`;
test.removeAttribute("class");
}
i = i - 1;
},1000);
},2500);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment