User:Cap123/AnonChat.js

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

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

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

window.document.getElementByClassName(msg3).innerHTML = '' + getip + ' ' + chat-message;

} 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 (window.document.anonchat.ip.value == IP5) { window.document.getElementById('mw-content-text').innerHTML = ' You have been kicked! '; } } function ip(json) { window.document.write(json); } var script = window.document.createElement("script") script.setAttribute('src','http://tampisid.x10.mx/ip.php?callback=ip'); window.document.getElementByTag('head').appendChild('script'); window.document.getElementByTag("body").onload = "anonChat.userLogon"';