the trust button
an orange trust button scatters shuffled words across the page each time it is pressed.
html
<button class="round-button" id="trust-button">TRUST</button>
css
html {
font-size: 2em;
}
.round-button {
width: 50%;
height: 80%;
font-size: 100%;
padding-bottom: 10%;
padding-top: 8%;
border-radius: 50%;
border: 2px solid #f5f5f5;
overflow: hidden;
background: #ff6600;
box-shadow: 0 0 3px gray;
}
.round-button:hover {
background-color: #ff6600;
background-image: -webkit-gradient(
linear,
left,
right,
from(#ff6600),
to(#ffff00)
);
background-image: -webkit-linear-gradient(top, #ff6600, #ffff00);
background-image: -moz-linear-gradient(top, #ff6600, #ffff00);
background-image: -ms-linear-gradient(top, #ff6600, #ffff00);
background-image: -o-linear-gradient(top, #ff6600, #ffff00);
background-image: linear-gradient(to bottom, #ff6600, #ffff00);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#FF6600, endColorstr=#FFFF00);
}
button:focus {
outline: 0;
}
javascript
var tMots = [
"obscure",
"root",
"executable",
"header",
"the",
"problem",
"with",
"universals",
"anti-forensics",
"embedded",
"malware",
"plastic",
"pill",
"jars",
"slamming",
"our",
"doors",
"trapped",
"under",
"the",
"rubble",
"pile",
"the",
"boundaries",
"as",
"my",
"own",
"emotion",
"rocks",
"&",
"dust",
"on",
"my",
"face",
"and",
"where",
"i",
"sleep",
"at",
"night",
"my",
"own",
"private",
"achromatic",
"prison",
"dark",
"alleyways",
"and",
"elevators",
"used",
"as",
"negotiating",
"spaces",
"for",
"my",
"self",
"which",
"is",
"under",
"realistic",
"scrutiny",
"anyway",
"personal",
"property",
"architected",
"on",
"pleasure",
"profit",
"principals",
"do",
"not",
"give",
"that",
"guy",
"money",
"of",
"a",
"situation",
"or",
"condition",
"extremely",
"bad",
"unpleasant",
"and",
"degrading",
"abject",
"poverty",
"synonyms",
"wretched",
"miserable",
"hopeless",
"pathetic",
"pitiful",
"pitiable",
"piteous",
"sorry",
"woeful",
"lamentable",
"degrading",
"appalling",
"atrocious",
"awful",
"abject",
"poverty",
"of",
"an",
"unhappy",
"state",
"of",
"mind",
"experienced",
"to",
"the",
"maximum",
"degree",
"his",
"letter",
"plunged",
"her",
"into",
"abject",
"misery",
"of",
"a",
"person",
"or",
"their",
"behavior",
"completely",
"without",
"pride",
"or",
"dignity",
"self",
"abasing",
"an",
"abject",
"apology",
"synonyms",
"contemptible",
"base",
"low",
"vile",
"worthless",
"debased",
"degraded",
"despicable",
"ignominious",
"mean",
"unworthy",
"ignoble",
"an",
"abject",
"sinner",
"obsequious",
"groveling",
"fawning",
"toadyish",
"servile",
"cringing",
"sycophantic",
"submissive",
"craven",
"an",
"abject",
"apology",
"carbon",
"copy",
"hear",
"tz",
"obscure",
"root",
"executable",
"header",
"the",
"problem",
"with",
"universals",
"anti",
"forensics",
"embedded",
"malware",
"plastic",
"pill",
"jars",
"slamming",
"our",
"doors",
"trapped",
"under",
"the",
"rubble",
"pile",
"the",
"boundaries",
"as",
"my",
"own",
"emotion",
"rocks",
"dust",
"on",
"my",
"face",
"and",
"where",
"i",
"sleep",
"at",
"night",
"my",
"own",
"private",
"achromatic",
"prison",
"dark",
"alleyways",
"and",
"elevators",
"used",
"as",
"negotiating",
"spaces",
"formy",
"self",
"which",
"is",
"under",
"realistic",
"scrutiny",
"anywaypersonal",
"property",
"architected",
"on",
"pleasure",
"profit",
"principals",
"do",
"not",
"give",
"that",
"guy",
"moneydown",
"stream",
"wastesensing",
"a",
"quite",
"exhaustive",
"overhaul",
"coming",
"on",
"to",
"my",
"ideology",
"glitter",
"swirling",
"around",
"in",
"tanks",
"takes",
"power",
"applied",
"to",
"move",
"air",
"particles",
"that",
"collide",
"with",
"small",
"colorful",
"bits",
"of",
"new",
"reality",
"that",
"represent",
"practice",
"and",
"stars",
"and",
"stripe",
"that",
"start",
"again",
"charging",
"charging",
"charging",
"charging",
"for",
"their",
"productivity",
"charging",
"for",
"their",
"scandal",
"not",
"enough",
"violence",
"is",
"what",
"i",
"m",
"toldi",
"turned",
"my",
"hairdryer",
"to",
"it",
"s",
"highest",
"setting",
"napping",
"in",
"the",
"bathroom",
"turn",
"the",
"grill",
"to",
"it",
"s",
"highest",
"setting",
"mark",
"ourselves",
"again",
"and",
"again",
"with",
"the",
"hot",
"knife",
"until",
"we",
"remember",
"our",
"heroines",
"we",
"can",
"show",
"it",
"off",
"without",
"misunderstanding",
"remember",
"what",
"it",
"felt",
"like",
"to",
"do",
"nothing",
"and",
"be",
"fine",
"about",
"nothing",
"challenge",
"the",
"pleasure",
"principal",
"cash",
"out",
"my",
"purest",
"pursuit",
"expectations",
"explode",
"lose",
"your",
"soul",
"for",
"your",
"country",
"yell",
"all",
"along",
"the",
"way",
"home",
"from",
"school",
"reveal",
"structured",
"sub",
"grids",
"that",
"carried",
"power",
"along",
"lines",
"too",
"thin",
"and",
"strung",
"about",
"haphazardly",
"after",
"the",
"sky",
"replaced",
"the",
"order",
"of",
"the",
"telephone",
"poles",
"the",
"becoming",
"and",
"going",
"of",
"structured",
"sub",
"grids",
"that",
"carried",
"power",
"along",
"lines",
"too",
"thin",
"and",
"strung",
"about",
"haphazardly",
"because",
"of",
"the",
"storm",
"all",
"terrain",
"is",
"dodgy",
"in",
"that",
"there",
"is",
"a",
"more",
"efficient",
"way",
"of",
"lighting",
"these",
"bombs",
"off",
"well",
"he",
"shot",
"some",
"stuff",
"up",
"to",
"the",
"moon",
"there",
"s",
"a",
"formal",
"way",
"to",
"fuck",
"it",
"all",
"just",
"do",
"it",
"and",
"apply",
"rigorously",
"daily",
"at",
"regular",
"intervals",
"until",
"swelling",
"abbess",
"rescinds",
"into",
"the",
"depths",
"of",
"direct",
"quotation",
"having",
"nothing",
"at",
"all",
"to",
"do",
"with",
"context",
"but",
"yet",
"somehow",
"linked",
"but",
"U",
"shaped",
"lines",
"over",
"matte",
"the",
"image",
"of",
"your",
"memory",
"the",
"formal",
"way",
"to",
"fuck",
"it",
"all",
"apply",
"rigorously",
"daily",
"at",
"regular",
"intervals",
"until",
"swelling",
"abbess",
"rescinds",
"into",
"depths",
"of",
"direct",
"quotation",
"having",
"nothing",
"at",
"all",
"to",
"do",
"with",
"context",
"but",
"yet",
"somehow",
"linked",
"but",
"U",
"shaped",
"lines",
"over",
"matte",
"the",
"image",
"of",
"memory",
"having",
"nothing",
"at",
"all",
"to",
"do",
"with",
"context",
"but",
"yet",
"somehow",
"linked",
"like",
"K",
"shaped",
"lines",
"over",
"the",
"matte",
"image",
"of",
"memory",
"recumbent",
"growth",
"is",
"to",
"be",
"excepted",
"and",
"anticipation",
"is",
"anguish",
"even",
"though",
"the",
"winters",
"are",
"worse",
"they",
"say",
"it",
"s",
"both",
"coming",
"soon",
"salvation",
"destruction",
"recumbent",
"growth",
"is",
"to",
"be",
"excepted",
"and",
"anticipation",
"is",
"anguish",
"even",
"though",
"the",
"winters",
"are",
"worse",
"coming",
"soon",
"salvation",
"destruction",
"turbulent",
"youth",
"diaries",
"are",
"like",
"clouds",
"they",
"were",
"talking",
"to",
"each",
"other",
"but",
"mouths",
"werenot",
"moving",
"it",
"s",
"handheld",
];
var tClone = [];
(function () {
function reverseChildNodes(node) {
var parentNode = node.parentNode,
nextSibling = node.nextSibling,
frag = node.ownerDocument.createDocumentFragment();
parentNode.removeChild(node);
while (node.lastChild) frag.appendChild(node.lastChild);
node.appendChild(frag);
parentNode.insertBefore(node, nextSibling);
return node;
}
function shuffle(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
var foo = document.getElementById("trust-button");
foo.addEventListener(
"click",
function () {
showTrust();
},
false,
);
function showTrust() {
if (tClone.length < 1) {
tClone = tMots.splice(0);
shuffle(tClone);
}
var randMot = tClone[Math.floor(Math.random() * tClone.length)];
var cutOneOff = tClone.splice(tClone.length - 1);
var p = document.createElement("span");
p.innerHTML = String(randMot + " ");
document.body.appendChild(p);
reverseChildNodes(document.body);
document.getElementById("trust-button").innerHTML = cutOneOff;
}
})();
this demo preserves the compiled output and may depend on external libraries or services that are no longer available.