Permalink
Browse files

remove jquery dependency on loader

  • Loading branch information...
1 parent e2d78ac commit cd938038e1fded5b4a44d7ee4d36b87e1f191b84 @dethe committed Jul 24, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 lib/loader.js
View
@@ -1,3 +1,14 @@
-$('head').append('<link rel="stylesheet" href="http://dethe.github.com/obloq/lib/obloq.css"><link rel="stylesheet" href="http://yandex.st/highlightjs/6.1/styles/default.min.css">');
-$('body').append('<script src="http://dethe.github.com/obloq/lib/raphael_152.js"></script><script src="http://dethe.github.com/obloq/lib/sketchy.js"></script>');
+function elem(name, attrs){
+ var e = document.createElement(name);
+ for (var key in attrs){
+ e.setAttribute(key, attrs[key]);
+ }
+ return e;
+}
+var head = document.getElementsByTagName('head')[0];
+var body = document.body;
+
+head.appendChild(elem('link', {rel: 'stylesheet', href: 'http://dethe.github.com/obloq/lib/obloq.css'}));
+body.appendChild(elem('script', {src: 'http://dethe.github.com/obloq/lib/raphael_152.js'}));
+body.appendChild(elem('script', {src: 'http://dethe.github.com/obloq/lib/sketchy.js'}));

0 comments on commit cd93803

Please sign in to comment.