source.js 1.2 KB

1234567891011121314151617181920212223242526
  1. javascript:(function() {
  2. var head = document.getElementsByTagName('head')[0],
  3. _createScript = function(path, onload) {
  4. var element = document.createElement('script');
  5. element.src = path;
  6. element.type = 'text/javascript';
  7. if (onload) {
  8. element.onload = onload;
  9. }
  10. head.appendChild(element);
  11. },
  12. _createStyle = function(path) {
  13. var element = document.createElement('link');
  14. element.href = path;
  15. element.rel = 'stylesheet';
  16. head.appendChild(element);
  17. };
  18. _createScript('https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', function() {
  19. ['https://cdn.rawgit.com/noelboss/featherlight/1.7.1/release/featherlight.min.js', 'https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?autorun=false', 'https://cdn.rawgit.com/notifyjs/notifyjs/master/dist/notify.js', 'https://cdn.rawgit.com/noelboss/featherlight/1.7.1/release/featherlight.min.css', 'https://cdn.rawgit.com/dom111/webdav-js/master/assets/css/style-min.css', 'https://cdn.rawgit.com/dom111/webdav-js/master/src/webdav-min.js'].forEach(function(file) {
  20. file.match(/css$/) ? _createStyle(file) : _createScript(file);
  21. });
  22. });
  23. })();