Skip to content

Instantly share code, notes, and snippets.

@benknight
Last active December 23, 2015 05:59
Show Gist options
  • Save benknight/6591197 to your computer and use it in GitHub Desktop.
Save benknight/6591197 to your computer and use it in GitHub Desktop.
New yelp.com loading spinner
.yelp-spinner {
opacity: 1;
background-color: rgba(255, 255, 255, 0.75);
}
.yelp-spinner .large-throbber-container {
background: url(http://f.cl.ly/items/1H1o3I3g3F3g343g190V/11_small.gif) no-repeat center;
background-color: white;
height: 92px;
width: 80px;
position: absolute;
text-align: center;
overflow: hidden;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
border-radius: 5px;
opacity: 0.9;
}
.yelp-spinner .large-throbber-container .loading-text {
display: none;
}
<body>
<head>
<meta charset="utf-8">
</head>
Drag me into the bookmarks bar:<br>
<a href="javascript:(function(){var gist_id='6591197';var css=[];var js=[];var applyCSS=function(){for(var x in css){var style=document.createElement('style');style.innerHTML=css[x];document.head.appendChild(style);}};var applyJS=function(){for(var x in js){var script=document.createElement('script');script.innerHTML=js[x];document.body.appendChild(script);}};var xhr=new XMLHttpRequest();xhr.open('GET','https://api.github.com/gists/'+gist_id,true);xhr.onload=function(){var data=JSON.parse(this.responseText);for(var file in data.files){if(data.files[file].language=='CSS'){css.push(data.files[file].content);}if(data.files[file].language=='JavaScript'){js.push(data.files[file].content);}}applyCSS();applyJS();};xhr.onerror=function(){console.log('Failed to load Gist: '+request.gist);};xhr.send();}());">Loading spinner</a>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment