mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-10 16:38:21 +00:00
[1.0] First commit
This commit is contained in:
16
js/utilsFunctions.js
Normal file
16
js/utilsFunctions.js
Normal file
@@ -0,0 +1,16 @@
|
||||
function injectScript(file, node) {
|
||||
var th = document.getElementsByTagName(node)[0];
|
||||
var s = document.createElement('script');
|
||||
s.setAttribute('type', 'text/javascript');
|
||||
s.setAttribute('src', file);
|
||||
th.appendChild(s);
|
||||
}
|
||||
|
||||
function injectLink(file, node) {
|
||||
var th = document.getElementsByTagName(node)[0];
|
||||
var link = document.createElement("link");
|
||||
link.href = file;
|
||||
link.type = "text/css";
|
||||
link.rel = "stylesheet";
|
||||
th.appendChild(link);
|
||||
}
|
||||
Reference in New Issue
Block a user