Update Userscript

This commit is contained in:
Ruud
2014-03-30 23:26:14 +02:00
parent 07fc4b3728
commit fb7dbd5716
2 changed files with 7 additions and 4 deletions
@@ -25,13 +25,16 @@ var version = {{version}},
host = '{{host}}',
api = '{{api}}';
function create() {
var create = function() {
var A, B;
switch (arguments.length) {
case 1:
var A = document.createTextNode(arguments[0]);
A = document.createTextNode(arguments[0]);
break;
default:
var A = document.createElement(arguments[0]), B = arguments[1];
A = document.createElement(arguments[0]);
B = arguments[1];
for ( var b in B) {
if (b.indexOf("on") == 0){
A.addEventListener(b.substring(2), B[b], false);