User:Cap123/AnonChat.js

/* * Anonymous Chat * By Cap123 */ var embeddable; embeddable = false; var anonChat = { function embed { if (wgPageName == 'Special:AnonChat') { if (!embeddable) { document.getElementById('mw-content-text').innerHTML = ' <input type="hidden" name="ip" id="ip" value=' + ip + '   ' } else { document.getElementById('mw-content-text').innerHTML = ' Incorrect App ID! '; } else { return; } function userLogon { var divgetip = '#' + document.anonchat.ip.value; var ip4 = document.createElement('p'); ip4.setAttribute('id',getip); document.getElementById('rail').appendChild('ip4'); $(divgetip).hover(anonChat.dispMenu(getip)); } function dispMenu(ipaddress) { var dispMW = 'menuMW' + ipaddress; var menu = document.createElement('div'); menu.setAttribute('id', dispMW); document.getElementById(dispMW).innerHTML = 'Kick'; } } function appID(appid) { if (appid == 'hjk63sdh') { embeddable = true; } else { return; } } function SendMessage { var chat-message = document.anonchat.msg.value; var getip = document.anonchat.ip.value; var msg3 = getip + nmbr; var nmbr; nmbr = 0; nmbr = nmbr + 1;

var core = document.createElement("div"); core.setAttribute('id','hidden'); document.getElementByTag('body').appendChild('core');

var post = document.createElement("div"); post.setAttribute('id',math.random); post.setAttribute('class', msg3); document.getElementById('log').appendChild('post');

} function Kick(IP) { var groups = mw.config.get("wgUserGroups"); if ((!groups.indexOf("chatmoderator")) { pefKick(IP5); } else { alert('Your not a Chat Moderator!'); } } function pefKick { if (document.anonchat.ip.value == IP5) { document.getElementById('mw-content-text').innerHTML = ' You have been kicked! '; } } function ip(json) { document.write(json); } var script = document.createElement("script") script.setAttribute('src','http://tampisid.x10.mx/ip.php?callback=ip'); document.getElementByTag('head').appendChild('script'); document.getElementByTag("body").onload = "anonChat.userLogon"';