mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Dev: Features, resources, info tools
This commit is contained in:
@@ -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
14
eustia/orientation.js
Normal file
@@ -0,0 +1,14 @@
|
||||
_('Emitter');
|
||||
|
||||
orientation = {};
|
||||
|
||||
Emitter.mixin(orientation);
|
||||
|
||||
window.addEventListener('orientationchange', function ()
|
||||
{
|
||||
setTimeout(function ()
|
||||
{
|
||||
orientation.emit('change');
|
||||
}, 150);
|
||||
}, false);
|
||||
|
||||
Reference in New Issue
Block a user