mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
gh-pages : preview v0.5.5
This commit is contained in:
parent
d711698c55
commit
457d1e3d62
3162
css/piskel-style-packaged-2015-09-14-10-01.css
Normal file
3162
css/piskel-style-packaged-2015-09-14-10-01.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
img/popup-preview-arrow-gold.png
Normal file
BIN
img/popup-preview-arrow-gold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 B |
BIN
img/popup-preview-arrow-white.png
Normal file
BIN
img/popup-preview-arrow-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 B |
27999
js/piskel-packaged-2015-09-14-10-01.js
Normal file
27999
js/piskel-packaged-2015-09-14-10-01.js
Normal file
File diff suppressed because one or more lines are too long
22
js/piskel-packaged-min-2015-09-14-10-01.js
Normal file
22
js/piskel-packaged-min-2015-09-14-10-01.js
Normal file
File diff suppressed because one or more lines are too long
86
piskel-boot-2015-09-14-10-01.js
Normal file
86
piskel-boot-2015-09-14-10-01.js
Normal file
@ -0,0 +1,86 @@
|
||||
(function () {
|
||||
|
||||
/**
|
||||
* See @Gruntfile.js => after build, -2015-09-14-10-01 is replaced by the build version
|
||||
*/
|
||||
var version = '-2015-09-14-10-01';
|
||||
var versionHasNotBeenReplaced = version.indexOf('@@') === 0;
|
||||
if (versionHasNotBeenReplaced) {
|
||||
version = '';
|
||||
}
|
||||
|
||||
window.onPiskelReady = function () {
|
||||
var loadingMask = document.getElementById('loading-mask');
|
||||
loadingMask.style.opacity = 0;
|
||||
window.setTimeout(function () {loadingMask.parentNode.removeChild(loadingMask);}, 600);
|
||||
pskl.app.init();
|
||||
// cleanup
|
||||
delete window.pskl_exports;
|
||||
delete window.loadDebugScripts;
|
||||
delete window.done;
|
||||
};
|
||||
|
||||
var prefixPath = function (path) {
|
||||
if (window.pskl && window.pskl.appEngineToken_) {
|
||||
return '../' + path;
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
};
|
||||
|
||||
var loadScript = function (src, callback) {
|
||||
src = prefixPath(src);
|
||||
var script = window.document.createElement('script');
|
||||
script.setAttribute('src',src);
|
||||
script.setAttribute('onload',callback);
|
||||
window.document.body.appendChild(script);
|
||||
};
|
||||
|
||||
var loadStyle = function (src) {
|
||||
src = prefixPath(src);
|
||||
var link = document.createElement('link');
|
||||
link.setAttribute('href', src);
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
document.head.appendChild(link);
|
||||
};
|
||||
|
||||
if (window.location.href.indexOf('debug') != -1) {
|
||||
window.pskl_exports = {};
|
||||
var scriptIndex = 0;
|
||||
window.loadNextScript = function () {
|
||||
if (scriptIndex == window.pskl_exports.scripts.length) {
|
||||
window.onPiskelReady();
|
||||
} else {
|
||||
loadScript(window.pskl_exports.scripts[scriptIndex], 'loadNextScript()');
|
||||
scriptIndex ++;
|
||||
}
|
||||
};
|
||||
loadScript('piskel-script-list.js', 'loadNextScript()');
|
||||
|
||||
window.loadStyles = function () {
|
||||
var styles = window.pskl_exports.styles;
|
||||
for (var i = 0 ; i < styles.length ; i++) {
|
||||
loadStyle(styles[i]);
|
||||
}
|
||||
};
|
||||
loadScript('piskel-style-list.js', 'loadStyles()');
|
||||
} else {
|
||||
var script;
|
||||
if (window.location.href.indexOf('pack') != -1) {
|
||||
script = 'js/piskel-packaged' + version + '.js';
|
||||
} else {
|
||||
script = 'js/piskel-packaged-min' + version + '.js';
|
||||
}
|
||||
loadStyle('css/piskel-style-packaged' + version + '.css');
|
||||
|
||||
var loaderInterval = window.setInterval(function () {
|
||||
if (document.querySelectorAll('[data-iframe-loader]').length === 0) {
|
||||
window.clearInterval(loaderInterval);
|
||||
loadScript(script, 'onPiskelReady()');
|
||||
} else {
|
||||
window.console.log('waiting for templates to load ....');
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
})();
|
Loading…
Reference in New Issue
Block a user