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
Object.prototype.addEvent=function(type,func){ | |
var tmpFnc = func; | |
eval("var "+type.split(".")[1]+"=tmpFnc"); | |
this.addEventListener(type.split(".")[0], eval(type.split(".")[1]), false); | |
}; | |
Object.prototype.removeEvent=function(type){ | |
this.removeEventListener(type.split(".")[0], eval("this."+type.split(".")[1]), false); | |
}; | |
//target.addEvent("click.name",function(){}); |
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
location.__proto__.getParm = (function(){ | |
if(this.search){ | |
var query = []; | |
var tmpQ = []; | |
query = location.search.replace("?","").split("&"); | |
for(var i=0;i<query.length;i++){ | |
tmpQ[query[i].split("=")[0]] = query[i].split("=")[1]; | |
} | |
return tmpQ ? tmpQ : undefined; |
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
Object.prototype.getId = function(id){ | |
return document.getElementById(id); | |
}; | |
Object.prototype.getTag = function(tag){ | |
return document.getElementsByTagName(tag); | |
}; | |
Object.prototype.addChild=function(tag){ | |
this.appendChild(document.createElement(tag)); | |
return this.childNodes; | |
}; |
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
$ary : "a", "b", "c" | |
@for $i from 1 through length($ary) | |
$selecter : "id_"+nth($ary, $i) | |
div.#{$selecter} | |
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
require([ | |
"somefile" | |
],function(){ | |
//init function | |
}); |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script data-main="js/app" src="./js/require.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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
.centering { | |
position: absolute; | |
margin: auto; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 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
{ | |
"name": "htdocs", | |
"version": "0.0.0", | |
"description": "ERROR: No README.md file found!", | |
"main": "index.js", | |
"dependencies": { | |
"grunt": "~0.4.1" | |
}, | |
"devDependencies": { | |
"grunt": "*", |
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 path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function(grunt) { | |
var pkg = grunt.file.readJSON('package.json'); | |
grunt.initConfig({ |
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
package hrkd { | |
import flash.events.Event; | |
import flash.events.IOErrorEvent; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
import com.adobe.serialization.json.JSON; | |
public class jsonloader { | |
private var myLoader; | |
private var _func:Function; |