[improvement] rename docs/src to docs/site (#3660)

This commit is contained in:
neverland
2019-06-27 11:37:44 +08:00
committed by GitHub
parent 75c79b7044
commit 425ba7ecf7
17 changed files with 6 additions and 6 deletions
+33
View File
@@ -0,0 +1,33 @@
function iframeReady(iframe, callback) {
const doc = iframe.contentDocument || iframe.contentWindow.document;
const interval = () => {
if (iframe.contentWindow.changePath) {
callback();
} else {
setTimeout(() => {
interval();
}, 50);
}
};
if (doc.readyState === 'complete') {
interval();
} else {
iframe.onload = interval;
}
}
const ua = navigator.userAgent.toLowerCase();
const isMobile = /ios|iphone|ipod|ipad|android/.test(ua);
function importAll(map, r) {
r.keys().forEach(key => {
map[key] = r(key);
});
}
export {
isMobile,
importAll,
iframeReady
};