This is now an actual repo:
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 socket = null; | |
| function bootstrap() { | |
| // 適当な図形を描画 | |
| var c = document.getElementById('mycanvas'); | |
| var ctx = c.getContext('2d'); | |
| ctx.globalalpha = 0.3; | |
| for(var i=0; i<1000; i++) { | |
| ctx.beginPath(); |
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($){ | |
| var // Promise methods | |
| promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), | |
| // Static reference to slice | |
| sliceDeferred = [].slice; | |
| if (typeof $ !== 'function') { | |
| return false; | |
| } else { |
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 aj( url ){ | |
| return $.ajax({ | |
| url: url, | |
| success: function( data ){ | |
| } | |
| ); | |
| } | |
| function resolve( args ){ |
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 hasOwnProperty solution, based on answers from: | |
| http://stackoverflow.com/questions/135448/how-do-i-check-to-see-if-an-object-has-an-attribute-in-javascript | |
| */ | |
| if ( !Object.prototype.hasOwnProperty ) { | |
| Object.prototype.hasOwnProperty = function(prop) { | |
| var proto = obj.__proto__ || obj.constructor.prototype; | |
| return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]); | |
| }; | |
| } |
NewerOlder