This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Cross browser, backward compatible solution | |
| (function( window, Date ) { | |
| // feature testing | |
| var raf = window.mozRequestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.msRequestAnimationFrame || | |
| window.oRequestAnimationFrame; | |
| window.animLoop = function( render, element ) { | |
| var running, lastFrame = +new Date; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 @louis_remi <http://louisremi.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function serverReachable() { | |
| // IE vs. standard XHR creation | |
| var x = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" ), | |
| s; | |
| x.open( | |
| // requesting the headers is faster, and just enough | |
| "HEAD", | |
| // append a random string to the current hostname, | |
| // to make sure we're not hitting the cache | |
| "//" + window.location.hostname + "/?rand=" + Math.random(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var elemDisplays = {}, | |
| // Store the iframe outside the function to reuse it | |
| iframe, iframeDoc; | |
| function defaultDisplay( nodeName ) { | |
| if ( !elemDisplays[ nodeName ] ) { | |
| // Try the classical method first, which is far faster | |
| var elem = document.createElement( nodeName ), | |
| display; | |
| document.body.appendChild( elem ); | |
| display = window.getComputedStyle( elem ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fakeXMLHttpRequest() { | |
| var self = this; | |
| this.upload = { | |
| addEventListener: function(evt, cb) { | |
| self.progressListener = cb; | |
| } | |
| } | |
| this.open = function() {}; | |
| this.overrideMimeType = function() {}; | |
| this.loaded = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create an EventSource object, | |
| // passing it the URL of the server sccript | |
| var evtSrc = new EventSource( "server.php" ); | |
| // Listen for messages/events on the EventSource | |
| evtSrc.onmessage = function ( e ) { | |
| addMessage( "status", JSON.parse(e.data) ); | |
| } | |
| evtSrc.addEventListener("checkin", function( e ) { | |
| addMessage( "checkin", JSON.parse(e.data) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>Over and Out test page</title> | |
| <link rel="stylesheet" type="text/css" media="all" href="shCore.css" /> | |
| <link rel="stylesheet" type="text/css" media="all" href="shThemeFadeToGrey.css" /> | |
| <style> | |
| .deco { | |
| padding: 5px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* We are defining the "timeline" of the animation, | |
| * each line representing a keyframe. | |
| */ | |
| @-moz-keyframes bounce { | |
| /* Translate the element 400px to the right */ | |
| /* Here we are animating "-moz-tranform", | |
| * but most CSS properties can be animated: | |
| * width, color, font-size, box-shadow, ... | |
| */ | |
| from { -moz-transform: translate(0px); } |
NewerOlder