Team:HSAAHNU Anhui/inject.js

From 2014hs.igem.org

(Difference between revisions)
(first trial to inject javascript)
(array-style injection)
Line 1: Line 1:
-
var cssLink = '<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">';
+
var injections = [
-
document.getElementsByTagName("head")[0].innerHTML += cssLink;
+
  '<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">',
 +
  '<link href="/Team:HSAAHNU_Anhui/normalize.css?action=raw&ctype=text/stylesheet'
 +
];
 +
 
 +
document.getElementsByTagName("head")[0].innerHTML += injections.join('\n');

Revision as of 09:50, 27 May 2014

var injections = [

 '<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">',
 '<link href="/Team:HSAAHNU_Anhui/normalize.css?action=raw&ctype=text/stylesheet'

];

document.getElementsByTagName("head")[0].innerHTML += injections.join('\n');