Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __dark = false;
- __t = document.createElement("input");
- __t.type = "button";
- __t.value = "Dark";
- tag("#chatbox_header").appendChild(__t);
- __s = document.createElement("style");
- __s.innerHTML = ".chatDark { background-color: #333!important; }"+
- ".chatDark * { background-color: #333!important; color: #CCC!important;}";
- tag("#chatbox_header").appendChild(__s);
- __t.onclick = function(){
- if(__dark){
- tag("#chatbox_members").setAttribute("class", "chatbox-members");
- tag("#chatbox").setAttribute("class", "teste");
- __dark = false;
- } else {
- tag("#chatbox_members").setAttribute("class", "chatDark");
- tag("#chatbox").setAttribute("class", "chatDark");
- __dark = true;
- }
- };
- function tag(t){
- var r;
- if(t.substr(0, 1) == "@"){
- r = document.getElementsByName( t.substring(1, t.length) );
- }
- else{
- r = document.querySelectorAll(t);
- }
- var teste = t.split(" ");
- teste = teste[teste.length-1].indexOf("#");
- if(teste != -1){
- return r[0];
- }else{ return r; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement