|
@@ -1,9 +1,14 @@
|
|
javascript:(function() {
|
|
javascript:(function() {
|
|
var head = document.getElementsByTagName('head')[0],
|
|
var head = document.getElementsByTagName('head')[0],
|
|
- _createScript = function(path) {
|
|
|
|
|
|
+ _createScript = function(path, onload) {
|
|
var element = document.createElement('script');
|
|
var element = document.createElement('script');
|
|
element.src = path;
|
|
element.src = path;
|
|
element.type = 'text/javascript';
|
|
element.type = 'text/javascript';
|
|
|
|
+
|
|
|
|
+ if (onload) {
|
|
|
|
+ element.onload = onload;
|
|
|
|
+ }
|
|
|
|
+
|
|
head.appendChild(element);
|
|
head.appendChild(element);
|
|
},
|
|
},
|
|
_createStyle = function(path) {
|
|
_createStyle = function(path) {
|
|
@@ -13,8 +18,10 @@ javascript:(function() {
|
|
head.appendChild(element);
|
|
head.appendChild(element);
|
|
};
|
|
};
|
|
|
|
|
|
- ['https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', 'https://cdn.rawgit.com/dom111/webdav-js/master/src/webdav-min.js', 'https://cdn.rawgit.com/dom111/webdav-js/master/external/fancybox/jquery.fancybox.js', 'https://cdn.rawgit.com/dom111/webdav-js/master/external/fancybox/jquery.fancybox.css', 'https://cdn.rawgit.com/dom111/webdav-js/master/assets/css/style-min.css'].forEach(function(file) {
|
|
|
|
- file.match(/js$/) ? _createScript(file) : _createStyle(file);
|
|
|
|
- })
|
|
|
|
|
|
+ _createScript('https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function() {
|
|
|
|
+ ['https://cdn.rawgit.com/dom111/webdav-js/master/src/webdav-min.js', 'https://cdn.rawgit.com/dom111/webdav-js/master/external/fancybox/jquery.fancybox.js', 'https://cdn.rawgit.com/dom111/webdav-js/master/external/fancybox/jquery.fancybox.css', 'https://cdn.rawgit.com/dom111/webdav-js/master/assets/css/style-min.css'].forEach(function(file) {
|
|
|
|
+ file.match(/js$/) ? _createScript(file) : _createStyle(file);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
})();
|
|
})();
|
|
|
|
|