Dev: Features, resources, info tools

This commit is contained in:
surunzi
2016-03-13 23:11:40 +08:00
parent 056f9359f0
commit d7c2ab66b2
21 changed files with 976 additions and 162 deletions

View File

@@ -1,6 +1,14 @@
loadJs = function (url)
loadJs = function (url, cb)
{
var script = document.createElement('script');
script.src = url;
script.onload = function ()
{
var isNotLoaded = script.readyState &&
script.readyState != "complete" &&
script.readyState != "loaded";
cb && cb(!isNotLoaded);
};
document.body.appendChild(script);
};

14
eustia/orientation.js Normal file
View File

@@ -0,0 +1,14 @@
_('Emitter');
orientation = {};
Emitter.mixin(orientation);
window.addEventListener('orientationchange', function ()
{
setTimeout(function ()
{
orientation.emit('change');
}, 150);
}, false);