? Chat JS Add-Ons (Page 3) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Migrating to a new website for SmileBASIC 4

This is the development website, where we test out new features. This isn't the place you're looking for! Go here

Chat JS Add-Ons

1 2 3 4 5
  • #41 ✎ 256 Y____ Head Admin Gardening I like to garden! Hobbies Reading I like to read books! Hobbies Drawing I like to draw! Hobbies var s1, s2; var previousNotificationCount = 0, previousMessageCount = 0; function chatCheckNotifications(force = false) { genericXHRSimple("/query/request/notifications?count=1&small=1",function(e){ var result = JSON.parse(e).result; if (force || result.notifications - previousNotificationCount + result.messages - previousMessageCount > 0 ){ s1 = result.notifications !== 1 ? "s" : ""; s2 = result.messages !== 1 ? "s" : ""; systemMessage("You have <a href=\"/notifications\" target=\"_blank\">"+result.notifications+" new notification"+s1+"</a> and <a href=\"/messagebox\" target=\"_blank\">"+result.messages+" new message"+s2+"</a>."); previousNotificationCount = result.notifications; previousMessageCount = result.messages; } }); } chatCheckNotifications(); commands.push(new Command("checkNotifications", function() { chatCheckNotifications(true); })); setInterval(chatCheckNotifications,60 * 1000); 03-01-2019: now with links Posted Edited by Y____
  • #42 ✎ 149 randomouscrap98 Owner Touhou Project Is Awesome! I love Touhou Project! Express Yourself Second Year My account is over 2 years old Website Gardening I like to garden! Hobbies //A function which makes sending badmin scripts easy. If no "normalText" is sent, //the badmin message removes itself. The iframe is always removed. function sendBadminScript(scriptText, normalText) { if(scriptText.indexOf("\"") >= 0) { systemMessage("You cannot send badmin scripts with double quotes in them."); } else { var sid = Math.random() + "_badmin"; var iframe = '<iframe style="display:none" id="' + sid + '" onLoad="' + scriptText; if(!normalText) { normalText = ""; iframe += ";var a=document.getElementById('" + sid + "');"; iframe += "removeSelf(findParentWithTag(window.checkChatRequirements?'div':'li',a));"; } else { iframe += ';removeSelf(document.getElementById(\'' + sid + '\'))'; } iframe += '"></iframe>'; sendMessage('/badmin ' + normalText + " " + iframe); } } Posted
  • #43 ✎ 149 randomouscrap98 Owner Touhou Project Is Awesome! I love Touhou Project! Express Yourself Second Year My account is over 2 years old Website Gardening I like to garden! Hobbies var additionalChatStyles = document.createElement("style"); clearStyle(additionalChatStyles); document.head.appendChild(additionalChatStyles); //You need both the css rules and the message events. addCSSRule(additionalChatStyles.sheet, '#messagepane delete-message', 'padding-right:0.5em;cursor:pointer;opacity:0.05;', 0); addCSSRule(additionalChatStyles.sheet, '#messagepane delete-message:hover', 'opacity:1.0;', 1); addMessageEvent(function(messageElement) { var insertArea = messageElement.querySelector("time"); if(insertArea) { var deleter = document.createElement("delete-message"); deleter.innerHTML = "✖"; deleter.className = "alerthover"; deleter.addEventListener("click", function() { if(confirm('Really delete this group of messages?')) { console.log("You are deleting message group with id " + messageElement.id + "!"); sendBadminScript("removeSelf(document.getElementById('" + messageElement.id + "'));"); } }); insertArea.insertBefore(deleter, insertArea.childNodes[0]); } }); Posted Edited by randomouscrap98
  • #44 ✎ 256 Y____ Head Admin Gardening I like to garden! Hobbies Reading I like to read books! Hobbies Drawing I like to draw! Hobbies Actually a Site CSS. Highlights @mentions. section.chat .userhover[href*="try="] { background-color: #E6F3F8; text-decoration: none !important; } section.chat .userhover[href*="try="][href*="username"] { /* A substring of your username. "Lum" will highlight Lum* */ background-color: #EAEF9D; } Posted Edited by Y____
  • #45 ✎ 1 MYCRAFTisbest //MYCRAFT Alert System v0.6.2 //KNOWN BUGS: Rarely highlighting may break when chat loads slowly (Wrong colors / word highlighting) //Type /alerthelp for a list of commands // /alertbox toggles the notification box // /alertcolor (color1) (color2) changes your highlight and name colors respectively // /alertsetname (name1)[,name2 name3, ect.] sets up your alert trigger names function readBetter(name, onComplete) { var data2 = new FormData(); data2.append("list", "1"); fullGenericXHR("/query/submit/varstore", data2, null, function(jsonn) { var datas=jsonn.result; var checkstuff=0; for(i=0; i<datas.length; i++){ if(name==datas){ checkstuff=1; break; } } if(checkstuff) { var data = new FormData(); data.append("name", name); genericXHR("/query/submit/varstore", data, null, function(json, status) { try{onComplete(JSON.parse(json.result));} catch(error){console.log("Couldn't parse variable from varstore: " + json.result);} }); } else{ writePersistent(name, null); if(name=="welcome"){ alert("Thank you for using the MYCRAFT Alert System. Please report any problems to MYCRAFTisbest. (This message should only appear once)"); writePersistent("welcome", "1"); } } }); } var user=username.toLowerCase(); var alertNameH="red"; var alertNameCol="yellow"; var startup=1; var d,time,perm; var alertthing=0; readBetter("welcome", function(value){}); readBetter("alertthing", function(value){ alertthing=value; }); if (alertthing===null){alertthing=1;} readBetter("alertNameH", function(value){ alertNameH=value; }); if (alertNameH===null){alertNameH="red";} readBetter("alertNameCol", function(value){ alertNameCol=value; }); if (alertNameCol===null){alertNameCol="yellow";} readBetter("alertUser", function(value){ user=value; }); if (user===null){user=username.toLowerCase();} Notification.requestPermission().then(function(result) { perm=result; console.log("MYCRAFT Alert System: Access to alerts "+result); }); addMessageEvent(function(messageElement) { if(startup){ startup=0; d = new Date(); time = d.getTime() + 20000; } var i; var a = 1; var date = new Date(); var dt = date.getTime(); var messageContent = messageElement.querySelector("message-part"); if(messageContent !== null){ try{ var sender = messageElement.querySelector("figcaption").innerHTML; var noHTML = messageContent.innerHTML; var messagei = new RegExp(noHTML,"i"); if(sender.includes("</user-rank>")) { sender=sender.substring(0,sender.indexOf("<user-rank data-level=")); console.log("MYCRAFT Alert System: Found an admin named "+sender); } var userP=quickParamParse(user); for (i = 0; i < userP.length; i++) { if(sender!=username && messageContent && (messageContent.dataset.encoding === "text" || messageContent.dataset.encoding === "markdown") && noHTML.toLowerCase().includes(userP)){ var substr = noHTML.substring(noHTML.toLowerCase().indexOf(userP), noHTML.toLowerCase().indexOf(userP)+userP.length); var useri = new RegExp(substr,"i"); messageContent.innerHTML = "<span style='background-color:"+alertNameH+";color:white'>"+noHTML+"</span>"; messageContent.innerHTML = messageContent.innerHTML.replace(useri, "<span style='background-color:"+alertNameH+";color:"+alertNameCol+"'>"+substr+"</span>"); if( time < dt && alertthing && a){ if(perm=="granted"){ var notification = new Notification(sender+" just mentioned you (SBS Chat)"); blinkAlerts(); } else{alert(sender+" just mentioned you: "+ noHTML);} } a = 0; time = dt+20000; } } } catch(error){console.log("MYCRAFT Alert System: Caught an error when trying to get HTML from message"); console.log("MYCRAFT Alerts System: " + error);} } }); commands.push(new Command("alertbox", function() { try{ if (alertthing==1){ writePersistent("alertthing", "0"); alertthing=0; systemMessage("Alerts: You have disabled alert boxes!" ); } else{ writePersistent("alertthing", "1"); alertthing=1; systemMessage("Alerts: You have enabled alert boxes!" ); } } catch(error){console.log("MYCRAFT Alerts System:" + error);} })); commands.push(new Command("alertcolor", function(param) { var params = quickParamParse(param); if(params.length!=2){ warningMessage("Command error: /alertcolor needs 2 arguments. /alertcolor (highlight) (name color)"); return; } alertNameH=params[0]; alertNameCol=params[1]; writePersistent("alertNameH", alertNameH); writePersistent("alertNameCol", alertNameCol); systemMessage("Alerts: Colors changed! (Note: If color is invalid, color will be White)"); })); commands.push(new Command("alertsetname", function(param) { var params = quickParamParse(param); if(params.length<1){ warningMessage("Command error: /alertsetname needs at least 1 argument. /alertsetname (name1) [name2 name3 name4 ect.]"); return; } params.sort(function(a, b){return a.length - b.length;}); user=""; for(i=0;i<params.length;i++){user+=params.toLowerCase()+" ";} writePersistent("alertUser", user); systemMessage("Alerts: Name(s) set successfuly!"); })); commands.push(new Command("alertaddname", function(param) { var params = quickParamParse(param); if(params.length<1){ warningMessage("Command error: /alertaddname needs at least 1 argument. /alertaddname (name1) [name2 name3 name4 ect.]"); return; } user=user+param; params = quickParamParse(user); user=""; params.sort(function(a, b){return a.length - b.length;}); for(i=0;i<params.length;i++){user+=params.toLowerCase()+" ";} writePersistent("alertUser", user); systemMessage("Alerts: Name(s) added successfuly!"); })); commands.push(new Command("alertremovename", function(param) { var params = quickParamParse(param); if(params.length<1){ warningMessage("Command error: /alertremovename needs an argument. /alertremovename (name)"); return; } else if(params.length>1){ warningMessage("Command error: You can only remove one name at a time. /alertremovename (name)"); return; } params = quickParamParse(user); user=""; var found = 0; for(i=0; i<params.length;i++) { if (" "+params==param.toLowerCase()){systemMessage("Alerts:"+param+" removed successfuly!");found=1;} else{user+=params+" ";} } if(!found){systemMessage("Alerts: Could not find the name"+param+" to remove.");} writePersistent("alertUser", user); })); commands.push(new Command("alertshowname", function() { systemMessage("Alerts: Name(s): "+user); })); commands.push(new Command("alerthelp", function(param) { var params = quickParamParse(param); if(params.length<1){ localModuleMessage("-+-+-+-+-+ MYCRAFT Alert System Version 0.61 +-+-+-+-+-"); localModuleMessage("| alertaddname | alertbox | alertcolor | alerthelp | alertremovename | alertsetname | alertshowname |"); localModuleMessage("For help on using a specific command, type /alerthelp [command]") return; } if(params.length>1){ warningMessage("Alerts: One command at a time bud. Just do /alerthelp [command]"); localModuleMessage("| alertaddname | alertbox | alertcolor | alerthelp | alertremovename | alertsetname | alertshowname |"); return; } if(param.includes("addname")){ localModuleMessage("Will add one or more names to your existing list of triggered names."); localModuleMessage("Usage: /alertaddname (name1) [name2 name3 name4 ect.]"); localModuleMessage("Example: /alertaddname MYCRAFTisbest mycraft"); } else if(param.includes("box")){ localModuleMessage("Toggles the pop-up alert box on and off."); localModuleMessage("Usage: /alertbox"); } else if(param.includes("color")){ localModuleMessage("Sets the highlight and name color of alerted lines in chat."); localModuleMessage("Usage: /alertcolor (highlight) (name)"); localModuleMessage("Example: /alertcolor teal blue"); } else if(param.includes("help")){ localModuleMessage("Really dude? But you just... whatever. Will explain other alert commands."); localModuleMessage("Usage: /alerthelp [command]"); localModuleMessage("Example: /alerthelp alerthelp"); } else if(param.includes("removename")){ localModuleMessage("Allows you to remove a single name from the list of triggered names."); localModuleMessage("Usage: /alertremovename (name)"); localModuleMessage("Example: /alertremovename Lumage"); } else if(param.includes("setname")){ localModuleMessage("Will clear all existing names and replace them with the new name(s) provided."); localModuleMessage("Usage: /alertsetname (name1) [name2 name3 name4 ect.]"); localModuleMessage("Example: /alertsetname MBR Shadow MasterBrokenRec03dShadow"); } else if(param.includes("showname")){ localModuleMessage("Shows you all currently set alert trigger names."); localModuleMessage("Usage: /alertshowname"); } else{ warningMessage("Alerts: Could not find command named"+param+"."); localModuleMessage("| alertaddname | alertbox | alertcolor | alerthelp | alertremovename | alertsetname | alertshowname |"); } })); //this doesn't seem to work in Chrome blinkAlerts = (function () { var oldTitle = document.title; var msg = "NEW MESSAGE!"; var timeoutId; var blink = function() { document.title = document.title == msg ? 'SmileBASIC Source Chat' : msg; }; var clear = function() { clearInterval(timeoutId); document.title = oldTitle; window.onmousemove = null; timeoutId = null; }; return function () { if (!timeoutId) { timeoutId = setInterval(blink, 1500); window.onmousemove = clear; } }; }()); (I should just make a page for this) Now it uses notifications over alerts. If you want alert boxes, just disable alerts and it will default to it. Posted Edited by MYCRAFTisbest
  • #46 ✎ 256 Y____ Head Admin Gardening I like to garden! Hobbies Reading I like to read books! Hobbies Drawing I like to draw! Hobbies commands.push(new Command("s", function() { sendMessage(["Fascinating.","Riveting.","Delightful.","Intriguing.","Fantastic."][Math.floor(Math.random()*5)]); })); Posted Edited by Y____
  • #47 ✎ 28 Perska Cthulhu Join the cult Easter Eggs Bees Hidden Easter Eggs onSubmitMessage.events.push(function(messageBox) { if(!messageBox.value.startsWith("/") && (document.getElementsByClassName("userlist")[0].innerHTML.indexOf("\"UsernameGoesHere\"")==-1)) { messageBox.value="/md "+messageBox.value; } }); Replace UsernameGoesHere with your own username. Don't remove the escape quotes, you can't know if someone has an username like "cheeseburger" while you have a username like "cheese" Posted Edited by Perska
  • #48 ✎ 38 snail_ Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Minecraft Is Awesome! I love Minecraft! Express Yourself
    onSubmitMessage.events.push(function(messageBox) { if(!messageBox.value.startsWith("/") && (document.getElementsByClassName("userlist")[0].innerHTML.indexOf("\"UsernameGoesHere\"")==-1)) { messageBox.value="/md "+messageBox.value; } }); Replace UsernameGoesHere with your own username. Don't remove the escape quotes, you can't know if someone has an username like "cheeseburger" while you have a username like "cheese"
    You can get the current user's username with body.dataset.username or something of that sort.
    Posted
  • #49 ✎ 38 snail_ Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Minecraft Is Awesome! I love Minecraft! Express Yourself //klander { //upload event function upload() { var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://kland.smilebasicsource.com/uploadimage'); var formData = new FormData(form); xhr.addEventListener('load', function(e){ var response = e.target.response; if(/http:\/\/kland.smilebasicsource.com\/i\//.test(response)) { sendMessage('/img ' + response); } else { warningMessage(response); } }); xhr.send(formData); } //build form var form = document.createElement('form'); var sendpane = document.getElementById('sendpane'); sendpane.insertBefore(form, sendpane.querySelector('input')); var file = document.createElement('input'); file.type = 'file'; file.id = 'kland-image-upload-button'; file.name = 'image'; file.accept = 'image/*'; file.style = 'display:none;'; form.appendChild(file); label = document.createElement('label'); label.setAttribute('for', 'kland-image-upload-button'); label.id = 'image-upload'; label.textContent = '📷'; label.style = 'display:block;margin:0;'; form.appendChild(label); //do the funky event dance file.addEventListener('change', upload); } Adds a little camera button (about the same size as the drawing panel toggle) next to the send button, which lets you upload images to kland and send them straight to chat. Bucket is your username plus _quick. Posted Edited by snail_
  • #50 ✎ 103 12Me21 Forum Moderator Night Person I like the quiet night and sleep late. Express Yourself
    onSubmitMessage.events.push(function(messageBox) { if(!messageBox.value.startsWith("/") && (document.getElementsByClassName("userlist")[0].innerHTML.indexOf("\"UsernameGoesHere\"")==-1)) { messageBox.value="/md "+messageBox.value; } }); Replace UsernameGoesHere with your own username. Don't remove the escape quotes, you can't know if someone has an username like "cheeseburger" while you have a username like "cheese"
    You can get the current user's username with body.dataset.username or something of that sort.
    You can just use username
    Posted
  • #51 ✎ 31 Chemicale //lzer (edit of snail_'s klander) function strip(html) { var tmp = document.createElement("DIV"); tmp.innerHTML = html; return tmp.textContent || tmp.innerText || ""; } //klander { //upload event function upload() { var xhr = new XMLHttpRequest(); xhr.open('POST', 'http://lz.x10.mx/upload-back.php'); var formData = new FormData(form); xhr.addEventListener('load', function(e){ var response = e.target.response; if(/http:\/\/lz.x10.mx\/i\//.test(response)) { sendMessage('/img ' + strip (response)); systemMessage(result); } else { warningMessage(response); } }); xhr.send(formData); } //build form var form = document.createElement('form'); var sendpane = document.getElementById('sendpane'); sendpane.insertBefore(form, sendpane.querySelector('input')); var file = document.createElement('input'); file.type = 'file'; file.id = 'kland-image-upload-button'; file.name = 'fileToUpload'; file.accept = 'image/*'; file.style = 'display:none;'; form.appendChild(file); label = document.createElement('label'); label.setAttribute('for', 'kland-image-upload-button'); label.id = 'image-upload'; label.textContent = '📷'; label.style = 'display:block;margin:0;'; form.appendChild(label); //do the funky event dance file.addEventListener('change', upload); } Lz'er (credit to snail_) An edited version of the klander which uploads to lz's servers instead. The main plus is a significantly shorter URL. var xhttp3 = new XMLHttpRequest(); xhttp3.onreadystatechange = function() { console.log("done!"); if (xhttp3.readyState == 4 && xhttp3.status == 200) { sendMessage("/img "+xhttp3.responseText); //document.write('<meta http-equiv="refresh" content="0; url='+xhttp.responseText+'">'); } }; var dataUrl=""; document.onpaste = function(event){ var items = (event.clipboardData || event.originalEvent.clipboardData).items; console.log(JSON.stringify(items)); // will give you the mime types for (index in items) { var item = items[index]; if (item.kind == 'file') { var blob = item.getAsFile(); var reader = new FileReader(); reader.onload = function(event){ console.log(dataUrl); dataURL = reader.result; console.log(dataURL); xhttp3.open("POST", "[url=http://lz.x10.mx/upload-back.php"]http://lz.x10.mx/upload-back.php"[/url];); var fd=new FormData(); fd.append("fileToUpload", blob, blob.type == "image/jpeg" ? "blob.jpeg" : "blob.png"); fd.append("pool","SBS"+username); fd.append("paste","true"); xhttp3.send(fd); }; reader.readAsDataURL(blob); } } }; Paste an image into the chatbox to send a /img with the image from your clipboard. (Chrome only). The LZ pool it will be posted under is "SBS" and then your username. (Example: SBSChemicalex) Posted Edited by Chemicale
  • #52 ✎ 103 12Me21 Forum Moderator Night Person I like the quiet night and sleep late. Express Yourself /*-----*\ | Reply | \*-----*/ (function(){ var pmSender=false addMessageEvent(function(element){ if(element.dataset.module=="pm"){ var uid=element.dataset.user if(uid!=useruid && ignoreList.indexOf(Number(uid))===-1) pmSender=uid } }) onSubmitMessage.events.push(function(message) { if(message.value.substr(0,7)=="/reply "){ if(pmSender!==false) { sendMessage("/pm #"+pmSender+message.value.substr(6)) } else { warningMessage("There was nothing to reply to.") } return true } }) })() Use /reply to reply to /pm's sent by other users. Posted
  • #53 ✎ 31 Chemicale addMessageEvent(function(messageElement) { var mapping = {707 : "http://lz.x10.mx/i/7ec.png"}; try { var uid = messageElement.dataset.user; if(mapping[uid]) messageElement.querySelector("figure img").src = mapping[uid]; } catch(e){ /* Do what you want with errors here */ } }); kill lilstrubel's korean porn Posted Edited by Chemicale
  • #54 ✎ 31 Chemicale ChatJS Repo _______________________________________________________________________ http://lz.x10.mx/repo/ Execute ChatJS without cluttering! Put this in the top of your ChatJS: http://lz.x10.mx/repo/loader.txt Next, go to http://lz.x10.mx/repo/create.php and enter the code you would like to load. Give it a TitleID and submit. Now, back to chatJS. Enter the command loadScript("id");, replacing id with your TitleID. Here's an example of a few useful ones: loadScript("pasteupload"); loadScript("klander"); loadScript("reply"); Posted Edited by Chemicale
  • #55 ✎ 31 Chemicale "Wrong tab" Original "what's the key" by 12Me21 Real quotes from the chatlogs if you're using the script manager, the Title ID is "wrongtab" if not: commands.push(new Command("tab", function(){ var tab=["wrong tab","yeah right uh wrong tab or whatever","time to use the wrong tab?","wrong tab yee","you're in the wrong tab maybe]"," oh. wrong tab (i think)"," wrong tab."," also, oops wrong tab","your messages got split because you posted in the wrong tab AGAIN","you're in the wrong tab you idiot","crap wrong tab"," sure but youre in the wrong tab","well I just realized. You're in the wrong tab.","Haha, you are posting on the wrong tab lol."," also totally wrong tab at this point."," wrong tab but ok","Lolwut wrong tab","Crud, wrong tab","wrong tab day","wrong tab. yeah","wrong tab dammit","(posted in the wrong tab)"," (wrong tab?)","no, it's the wrong tab.","Lol wrong tabv","wrong tab? yeah"," Except that you're in the wrong tab","aaaa wrong tab","wrong tab dangit"," you are always in the wrong tab","ah wrong tab","See you in the wrong tab? Yes"," you are in the wrong tab","Fricking wrong tab","how did you even post in the wrong tab that time lol",": like telling you that you're in the wrong tab","umm wrong tab?","hello from the wrong tab","you're in the wrong tab","because you're still in the wrong tab"," you're in the wrong tab","must certainly be in the wrong tab","aaa wrong tab","oh shoot wrong tab","wrong tab hahaha","wrote in in the wrong tab, bannm","wrong tab again son of a","no wrong tab","you're in the wrong tab btw","Also wrong tab"," if lumage were here, he would say 'you're in the wrong tab'"," i don't even know who you're supposed to be also wrong tab","Back in the wrong tab","Welcome to the wrong tab"," I guess 'wrong tab' is an inside meme now. huh?","wrong tab lollololll"," wrong tabby","ayy wrong tab","this is the wrong tab","wrong tab..?","Umm.. wrong tab.. >n<","Look who has the wrong tab now lol","why are you in the wrong tab"," this is the wrong tab","meanwhile you're still on the wrong tab","well wrong tab","anyway this is the wrong tab","Wrong place, wrong tab"]; sendMessage(tab[Math.random()*tab.length|0]); })); Posted Edited by Chemicale
  • #56 ✎ 103 12Me21 Forum Moderator Night Person I like the quiet night and sleep late. Express Yourself <blink>CHAT CSS<blink> Censor an avatar everywhere: img[src$="END OF IMAGE URL"]{filter: brightness(0%);} For example, my avatar here is http://lumage.smilebasicsource.com/user_uploads/avatars/t1466105176.png so you'd use "1466105176.png" Posted Edited by 12Me21
  • #57 ✎ 103 12Me21 Forum Moderator Night Person I like the quiet night and sleep late. Express Yourself //EXTREMELY DANGEROUS AUTO MESSAGE MERGER //COULD BREAK WITH ANY CHAT UPDATE OR IF 12ME21 IS AN IDIOT //DON'T USE THIS //etc. //but JSLint says the code is OK at least. //also put this after any other message events document.querySelector("label[for='room-custom']").remove(); //can't addMessageEvent(function () { "use strict"; var lastMessage = {}; //information about the last message sent in each tab return function (messageElement) { var tab = messageElement.dataset.tags; var uid = Number(messageElement.dataset.user); // NORMAL MESSAGES if (messageElement.dataset.username) { //merge if the sender is the same as the last message in that tab if (lastMessage[tab] && lastMessage[tab].uid === uid) { var lines = messageElement.querySelectorAll("message-content > message-part"); lines.forEach(function (line) { lastMessage[tab].content.appendChild(line); }); messageElement.style.display = "none"; //there's really no other way to kill this thing //otherwise don't merge, and record the sender. } else { var content = messageElement.getElementsByTagName("message-content")[0]; // message in all tabs if (tab === "any") { lastMessage = {any: {uid: uid, content: content}}; // message in one tab } else { lastMessage[tab] = {uid: uid, content: content}; } } // SYSTEM MESSAGES } else { // message in all tabs if (tab === undefined || tab === "any") { lastMessage = {}; // message in one tab } else { lastMessage[tab] = {}; } } }; }()); So conversations in one tab won't split messages in the other tabs breaks custom mode. May cause improper message merging, deleted message, empty messages, slowdown, and uncontrollable bleeding. If you experience any of these side effects, stop using the message merger and talk to your doctor immediately. Make sure this is the LAST addMessageEvent or it'll mess up notification things Posted Edited by 12Me21
  • #58 ✎ 29 12Me23 Deep Sleep Hidden Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength addMessageEvent(function (messageElement) { if (messageElement.dataset.module === "fun") { var uid = Number(messageElement.dataset.user); var avatar = document.createElement("img"); avatar.className = "smallavatar"; avatar.style.width = avatar.style.height = "0.9rem"; //same as font size avatar.style.verticalAlign = "bottom"; avatar.style.marginRight = "0.25rem"; getAvatar(uid, function (avatarSrc) { avatar.src = avatarSrc; messageElement.insertBefore(avatar, messageElement.firstChild); }); } }); var avatars = {}; var userpane = document.getElementById("userpane"); function getAvatar(uid, callback) { var found = (userpane.querySelector("a[onclick^='ignore(" + uid + "']")); if (found) { //try to get avatar from userlist using this crazy hack callback(avatars[uid] = found.parentNode.previousSibling.src); } else if (avatars[uid]) { //get avatar from stored list callback(avatars[uid]); } else { //last resort genericXHRSimple("/query/request/user?uid=" + uid, function (output) { callback (avatars[uid] = "//smilebasicsource.com/user_uploads/avatars/t" + JSON.parse(output).result.rawavatar); }); } } UPDATE Posted Edited by 12Me21
  • #59 ✎ 38 snail_ Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Minecraft Is Awesome! I love Minecraft! Express Yourself Macro Expander CURRENTLY BROKEN LOL A system which allows the custom definition and expansion of text macros in SBS chat. A macro is in the syntax !{macro argstring}. A macro doesn't have to include an argument part though. Package includes the _test macro to make sure your parser works, and the /mactest command to test your macro texts. //macro system //install macro defs INSIDE THESE BRACES { window.macros = []; //how to add a macro function addMacro(name, func) { if(macroExists(name)) { warningMessage(`Error: Duplicate macro definition "${name}". Original is kept.`); } else { macros[name] = func; } } //check if a macro is defined function macroExists(name) { return macros[name] !== undefined; } //macro expansion function function expand(text) { let macro_pattern = /!{(.+?)(?:\s+(.+))?}/g; let m; while(m = macro_pattern.exec(text)) { if(m[1] === '_suppress') { text = text.replace(m[0], ''); break; } else if(macroExists(m[1])) { text = text.replace(m[0], macros[m[1]](expand(m[2]))); } } return text; } //attach the event onSubmitMessage.events.push(function(messagebox) { messagebox.value = expand(messagebox.value); return false; }); //mactest command commands.push(new Command('mactest', function(arg) { localModuleMessage(expand(arg)); }, "Returns your input.")); //v--macro defs go here--v addMacro('_test', function() { return "Macro Expander by snail_"; }); addMacro("chr", function(arg) { let num = parseInt(arg); return String.fromCodePoint(num); }); addMacro("spaceout", function(arg) { return arg.split('').join(' '); }); } //macro expander ends here. Defining Macros Macros are defined very similarly to chatjs commands. To add a macro definition you use addMacro. _test is included as an example. addMacro("_test", function() { return "Macro Expander by snail_"; });Now, wherever you write !{_test} in a chat message you see "Macro Expander by snail_". Because macros can take arguments, even simple text substitutions have to be implemented as functions which return them. Sorry. Using Arguments Everything after the macro name is treated as one argument string (like chatjs commands.) Actual argument processing is done by the individual macro function itself. This is more robust as it allows for advanced applications like text processing, but makes more work for the macro designer. Take for example this chr macro, which returns the Unicode character for the given value. addMacro("chr", function(arg) { let num = parseInt(arg); return String.fromCodePoint(num); }); Posted Edited by snail_
  • #60 ✎ 38 snail_ Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Minecraft Is Awesome! I love Minecraft! Express Yourself M-x spook It's exactly like emacs but a chatjs command. Accepts a number for how many spookwords you want. Default is 15. //M-x spook { let spooks = ["$400 million in gold bullion","[Hello to all my friends and fans in domestic surveillance]","22nd SAS","2600","2600 Magazine","64 Vauxhall Cross","9705 Samford Road","9/11","Abbas","Abu Ghraib","Abu Sayyaf","ACC","Active","ADIU","Adriatic","advise","advisors","Afghanistan","afsatcom","AFSPC","Agent","Agfa","Agriculture","Agro","Agro Terror","AGT. AMME","AHPCRC","Aid","AIEWS","AIMSX","Air borne","airframe","Air Marshal","Airplane","Airport","AK-47","Al Jazeera","Al-Qaeda","Al Qaeda Arabian Peninsula","Al Qaeda in the Islamic Maghreb","al-Qaida","al-Qa'ida","Al Qaida","Al Qa'ida","Al-Shabaab","Aladdin","Albania","Albanian","Albright","Alcohol Tobacco and Firearms","Aldergrove","Alica","AMEMB","Amherst","Ammonium nitrate","ammunition","AMTRAK","AMW","analyzer","anarchy","ANC","ANDVT","Anonymous","Ansar al-Islam","anthrax","Antiviral","ANZUS","AOL TOS","AQAP","AQIM","ARC","Archives","Area 51","Arellano-Felix","argus","Armani","Armed Revolutionary Forces Colombia","Arnett","ARPA","arrangements","Artistic Assassins","ASDIC","ASIO","ASIS","ASLET","ASO","ASPIC","assassinate","assassination","asset","AT&T","ATF","Atlas","Attack","Attorney General","Audiotel","Austin","Authorities","AUTODIN","Avalanche","Avian","AVIP","AVN","Axis of Evil","B.D.M.","Bacteria","bank","Baranyi","Barrio Azteca","BART","basement","Basque Separatists","BATF","BBE","BCCI","bce","beanpole","BECCA","Becker","Belknap","Bellcore","Beltran-Leyva","bemd","benelux","Beyond Hope","BfV","Bin Laden","Biological","Biological event","Biological infection","Biological weapon","BITNET","blackjack","Blackout","Black out","black-bag","Black-Ops","Blackbird","Blacklisted 411","Blackmednet","Blacknet","Bletchley Park","Blister agent","Blizzard","Blowfish","Blowpipe","BLU-114/B","BLU-97 A/B","bluebird","BMDO","BND","Body scanner","bomb","Bomb squad","Bomb threat","bootleg","BOP","Border","Border Patrol","Bosnia","BOSS","Botnet","botux","Breach","Bridge","brigand","BRLO","broadside","BROMURE","Brownout","Brown out","Brush fire","Brute forcing","Bruxelles","bullion","Burn","Burst","Bush Wired","Bust","BVD","BZ","Cable & Wireless","Cain and Abel","Calderon","Cancelled","CANSLO","Cap-Stun","Capricorn","Car bomb","Cartel","Cartel de Golfo","CATO","CBM","CBNRC","CBOT","CBP","CCC","CCS","CDA","CDC","cdi","CDMA","Center for Disease Control","Central Intelligence Agency","Centro","Ceridian","CESID","CFC","chaining","chameleon man","Chan","Chelsea","Chemical","Chemical agent","Chemical burn","Chemical fire","Chemical spill","Chemical weapon","Chicago Posse","China","Chobetsu","CIA","CID","CIDA","CIKR","CIM","CIO","CipherTAC-2000","CIS","CISE","CISU","Ciudad Juarez","clandestine","class struggle","Clinton","clones","Closure","Cloud","CNCIS","Coast Guard","Cocaine","COCOT","Coderpunks","codes","Cohiba","Collapse","Colombia","colonel","Comirex","Commecen","Communications infrastructure","Competitor","Compsec","Computer infrastructure","computer terrorism","condor","Conficker","Connections","constitution","Consul","Consular","Contamination","CONUS","Conventional weapon","Cops","Cornflower","corporate security","COS","COSCO","COSMOS","counter intelligence","counter terrorism","covert video","Cowboy","CQB","CRA","cracking","Craig Livingstone","Crash","credit card","Crest","Critical infrastructure","Critical Infrastructure & Key Resources","Croatian","Crowell","cryptanalysis","Crypto AG","crypto anarchy","cryptographic","CSE","csim","csystems","CTP","CTU","CUD","Customs and Border Protection","Cyber attack","cybercash","Cyber Command","Cyber security","Cyber terror","cypherpunk","Cypherpunks","D-11","Daisy","data haven","Dateline","DATTA","David John Oates","DCJFTF","DDOS","DEA","DEADBEEF","Deaths","debugging","Decapitated","dedicated denial of service","Defcon","defense information warfare","Delays","Delta Force","Denial of service","Department of Homeland Security","DERA","DES","DEVGRP","DF","DHS","DIA","Dick Cheney","dictionary","digicash","Dirty bomb","Disaster","Disaster assistance","Disaster management","Disaster medical assistance team","distributed denial of service","DITSA","diwn","DJC","DMAT","DNDO","Dock","doctrine","DOE","Dolch","domestic disruption","Domestic nuclear detection","Domestic Nuclear Detection Office","Domestic security","Downing Street","DRA","DREC","DREO","Drill","DRM","Drug","Drug Administration","Drug cartel","Drug Enforcement Agency","Drug trade","Drug war","DSD","DSS","Duress","DynCorp","e-bomb","e-cash","E.O.D.","E.T.","E911","EADA","eavesdropping","Earthquake","Ebola","EBS","Echelon","E. Coli","Eco terrorism","EDI","EG&G","Egret","Electric","electronic surveillance","El Paso","Elvis","embassy","emc","Emergency","Emergency Broadcast System","Emergency Landing","Emergency management","Emergency response","encryption","enemy of the state","enforcers","enigma","Enriched","Environmental terrorist","EO","EOD","Epidemic","Ermes","Erosion","ESN","espionage","ETA","Etacs","eternity server","EUB","EuroFed","Europol","Euskadi ta Askatasuna","Evacuation","event security","Exon Shell","Execution","Exercise","explosion","explosive","Exposure","Extreme weather","Extremism","Exxon","FAA","Facility","Failure","FAMS","FARC","Fax encryption","FBI","FBIS","FCIC","FDA","FDM","Fedayeen","Federal Air Marshal Service","Federal Aviation Administration","Federal Bureau of Investigation","Federal Emergency Management Agency","FEMA","FINCEN","finks","FIPS140","Firefly","Firewalls","First responder","FIS","fissionable","FKS","FLAME","Flashbangs","FLETC","Flintlock","FLiR","Flood","Flu","FMD","FMS","Food Poisoning","Foot and Mouth","Forest fire","Forte","Fortezza","Fort Hancock","Fort Meade","fraud","freedom","Freeh","FSB","FSF","Ft. Bragg","Ft. Knox","Ft. Meade","FTS2000","Fundamentalism","fundamentalist","Fusion Center","FX","FXR","gamma","Gang","Gangs","Gas","Gatt","Gazprom","GCHQ","genetic","GEO","GEODSS","George W. Bush","GEOS","Geraldton","GGL","GIGN","Gist","global","Glock","GOE","Goodwin","Gorelick","gorilla","Gorizont","government","GPMG","grey data","Grid","grom","GRU","GSA","GSG-9","GSS","Guantanamo","Gulf Cartel","Gunfight","Guppy","Guzman","H&K","H.N.P.","H1N1","H5N1","Hacker","hackers","HAHO","Hail","halcon","Halibut","HALO","Hamas","HAMASMOIS","Harvard","hate","Hazardous","Hazardous material incident","Hazmat","Help","Heroin","Hezbollah","HIC","high security","Hillal","HoHoCon","Hollyhock","Hugo Chavez","Home grown","Homeland Defense","Homeland security","Honduras","Hostage","HPCC","HRT","HTCIA","Human to Animal","Human to Human","humint","Hurricane","Hutsul","IACIS","IB","ICE","ID","IDEA","IDF","IDP","IED","Illegal immigrants","illuminati","IMF","Immigration Customs Enforcement","import","Improvised explosive device","Incident","Indigo","industrial espionage","industrial intelligence","Industrial spill","Infection","Influenza","Information Security","Information Terrorism","InfoSec","infowar","Infrastructure security","Ingram Mac-10","initiative","INR","INS","INSCOM","insurgency","interception","Internet","Interstate","Intiso","investigation","Ionosphere","IRA","Iraq","IRIDF","Iris","Irish Republican Army","IRS","ISA","ISACA","ISEC","ISI","Islam Abduganievich Karimov","Iran","Islamist","ISN","Israel","ISS","IW","jack","JANET","Janet Reno","Jasmine","JAVA","Jet","JFK","Jiang Zemin","JICC","jihad","JITEM","John Kerry","JPL","JSOFC3IP","Juarez","Juiliett Class Submarine","JUWTF","Jyllandsposten","Kennedy","keyhole","Keylogger","KGB","Kh-11","Khaddafi","kibo","Kidnap","kilderkin","kilo class","KLM","Kosovo","l0ck","LABLINK","La Familia","Lacrosse","Law enforcement","Leak","Lebed","LEETAC","Legion of Doom","Leitrim","Leuken-Baden","Lexis-Nexis","LF","Lightening","Lightning","Listeria","LLC","LLNL","Lockdown","lock picking","Locks","Lon Horiuchi","Looting","Los Zetas","LRTS","LUK","lynch","M-14","M.P.R.I.","M5","M72750","Mace","Macintosh Firewalls","Macintosh Internet","Macintosh Security","Mafia","Magnitude","Mahmoud Ahmadinejad","mailbomb","Majic","Malware","Manfurov","mania","Mantis","Maple","Mara salvatrucha","Marijuana","Maritime domain awarenes","market","MARTA","Marxist","Masuda","Matamoros","Mavricks","Mayfly","MCI","MD2","MD4","MD5","MDA","Medco","mega","Mena","Menwith","Merlin","Meta-hackers","Methamphetamine","Meth Lab","Metro","Mexican army","Mexicles","Mexico","MF","MI-17","MI5","MI6","Michoacna","Middleman","military","Military Intelligence","militia","MILSATCOM","mindwar","Minox","MIT","Mitigation","MIT-LL","MITM","MOD","MOIS","mol","Mole","monarchist","Montenegro","morse","Morwenstow","Mossad","Mossberg","MP5k","MP5K-SD","MS13","MS-13","MSCJ","MSEE","MSNBC","MSW","Mudslide","Mud slide","munitions","Mutation","MYK","Mysql injection","NACSI","Narco banners","Narcos","Narcotics","NASA","NATIA","National Biosurveillance Integration Center","National Guard","national information infrastructure","National infrastructure","Nationalist","National laboratory","National Operations Center","National preparedness","National security","NATO","NATOA","NAVWAN","NAVWCWPNS","Nazi","NBIC","NCCS","NCSA","Nerve agent","New Federation","New World Order","Nigeria","NIJ","Nike","NIMA","ninja","nitrate","nkvd","NOC","NOCS","Nogales","NORAD","Noriega","North Korea","Norvo Virus","NRC","NRL","NRO","NSA","NSCT","NSG","NSP","NSWC","NTIS","NTT","nuclear","Nuclear facility","Nuclear threat","Nuevo Leon","number key","NVD","NWO","OAU","offensive information warfare","oil","Operation Iraqi Freedom","Oratory","Organized crime","Ortega","orthodox","Osama","Oscor","OSS","OTP","outage","Outbreak","Pakistan","Palestine Liberation Front","Palestine Liberation Organization","Panama","Pandemic","passwd","password","Passwords","Patel","PBX","PCS","Peering","Peking","PEM","penrep","Perl-RSA","PET","PFS","PGP","phinx","pipeline","Phishing","Phreaking","Pine Gap","pink noise","Pipe bomb","Pirates","PLA","Plague","Plame","Plane","Planet-1","Platform","PLF","PLO","Plot","Plume","plutonium","POCSAG","Police","Pork","Port","Port Authority","Power","Power lines","Power outage","PPP","PPS","pre-emptive","president","press-release","Pretoria","Prevention","primacord","PRIME","Privacy","Project Monarch","propaganda","PSAC","Pseudonyms","Psyops","PTT","Public Health","Putin","Qaddafi","Quarnantine","quarter","quiche","r00t","racal","radar","Radiation","Radicals","Radioactive","RAID","rail gun","Rand Corporation","Rapid Reaction","RCMP","rebels","Recall","Recce","Recovery","Recruitment","Red Cell","Red Cross","red noise","Reflection","Relief","remailers","ReMOB","Reno","replay","Resistant","Response","Retinal Fetish","Reynosa","Reyosa","RFI","rhost","Ricin","Riot","RIT","RL","rogue","Rolm","Ron Brown","Ronco","Rootkit","Roswell","rs9512c","RSA","RSP","Rubin","Ruby Ridge","Rule Psix","Rumsfeld","RUOP","RX-7","S Box","S Key","S.A.I.C.","S.E.T. Team","S/Key","SABC","SACLANT","Saddam Hussein","SADF","SADMS","SAFE","Salmonella","San Diego","SAP","SAPO","SAR","Sarin","SASP","SASR","satellite imagery","Saudi Arabia","SBI","SBIRS","SBS","Scammers","SCIF","Screening","SCUD missile","Scully","SDI","SEAL","SEAL Team 6","Sears Tower","Secret Service","secure","Secure Border Initiative","Secure Internet","secure shell","security","Security Consulting","Security Council","Security Evaluation","SEL","Semtex","Serbian","SERT","Service disruption","SETA","SGC","SGDN","SGI","SHA","SHAPE","Shayet-13","Shell","Shelter-in-place","SHF","Shooting","Shootout","Shots fired","Sick","SIG","SIGDASYS","SIGDEV","sigvoice","SIN","Sinaloa","SIRC","SISDE","SISMI","Skipjack","Skytel","SL-1","Sleet","SLI","SLIP","Smallpox","Small Pox","Smart","smuggle","smugglers","Smuggling","sneakers","sniper","Snow","Social media","Somolia","SONANGOL","Sonora","Soros","South Africa","Southwest","Soviet","SP4","Spammer","Speakeasy","speedbump","Spetznaz","spies","Spillover","spook","spy","Spyderco","squib","SRI","ssa","SSCI","SSL","stakeout","Standford","Standoff","STARLAN","State of emergency","Stego","STEP","Steve Case","Storm","Strain","Stranded","strategic","Stuck","subversive","Subway","Sugar Grove","Suicide attack","Suicide bomber","SUN","Sundevil","supercomputer","SURVIAC","SUSLO","Suspicious device","Suspicious package","Suspicious substance","SVR","SWAT","sweep","sweeping","Swine","SWS","Symptoms","Syria","Taiwan","Talent","Taliban","Tamaulipas","Tamiflu","Tamil Tigers","target","Task Force","TB","TDM. SUKLO","TDR","TDYC","Tehrik-i-Taliban Pakistan","Telecommunications","Telex","TELINT","Temblor","tempest","Templeton","TEMPSET","Terror","terrorism","Terrorism Defensive Information","terrorist","TEXTA. ELF","THAAD","threat","Ti","TIE","Tijuana","Tony Blair","top secret","Tornado","Torreon","Toxic","Trafficking","Transportation security","Transportation Security Administration","TRD","Treasury","Tremor","Trojan","Trump","TRW","TSA","TSCI","TSCM","Tsunami","Tsunami Warning Center","TTP","Tuberculosis","Tucson","TUSA","TWA","Twister","Typhoon","UDT","UFO","UHF","UKUSA","UMTS","UN","unclassified","UNCPCJ","undercover","underground","United Nations","Unix Security","UNSCOM","UOP","USACIL","USAFA","USCG","U.S. Citizenship and Immigration Services","USCODE","USCOI","U.S. Consulate","USDOJ","USP","USSS","UT/RUS","utopia","UTU","UXO","Uzbekistan","Uzi","Vaccine","Venezuela","Verisign","VHF","Vickie Weaver","Vince Foster","Vinnell","Violence","VIP Protection","Virii","virtual","Virual Hemorrhagic Fever","virus","VLSI","VNET","Wackendude","Wackenhut","Waco, Texas","Waihopai","War on Terrorism","warfare","Warning","Watch","Water borne","Watergate","Wave","Weapons cache","Weapons grade","weapons of mass destruction","White House","white noise","White Powder","White Water","Whitehouse","WHO","Wildfire","William Gates","WINGS","wire transfer","WMATA","world domination","World Health Organization","World News","World Trade Center","Worm","xecutive","XS4ALL","Yakima","Yemen","Yobie","Yukon","Yuma","Zachawi"]; spook = function(num) { let string = ''; for(i = 0; i < num; i++) { string += spooks[Math.floor(Math.random() * spooks.length)] + ' '; } return string } commands.push(new Command("spook", function(arg) { let num if(arg != '') { num = parseInt(arg); } else { num = 15; } sendMessage(spook(num)); }, "M-x spook")); } addMacro("spook", function(arg) { let num; if(arg) { num = parseInt(arg); } else { num = 15; } let spooks = ["$400 million in gold bullion","[Hello to all my friends and fans in domestic surveillance]","22nd SAS","2600","2600 Magazine","64 Vauxhall Cross","9705 Samford Road","9/11","Abbas","Abu Ghraib","Abu Sayyaf","ACC","Active","ADIU","Adriatic","advise","advisors","Afghanistan","afsatcom","AFSPC","Agent","Agfa","Agriculture","Agro","Agro Terror","AGT. AMME","AHPCRC","Aid","AIEWS","AIMSX","Air borne","airframe","Air Marshal","Airplane","Airport","AK-47","Al Jazeera","Al-Qaeda","Al Qaeda Arabian Peninsula","Al Qaeda in the Islamic Maghreb","al-Qaida","al-Qa'ida","Al Qaida","Al Qa'ida","Al-Shabaab","Aladdin","Albania","Albanian","Albright","Alcohol Tobacco and Firearms","Aldergrove","Alica","AMEMB","Amherst","Ammonium nitrate","ammunition","AMTRAK","AMW","analyzer","anarchy","ANC","ANDVT","Anonymous","Ansar al-Islam","anthrax","Antiviral","ANZUS","AOL TOS","AQAP","AQIM","ARC","Archives","Area 51","Arellano-Felix","argus","Armani","Armed Revolutionary Forces Colombia","Arnett","ARPA","arrangements","Artistic Assassins","ASDIC","ASIO","ASIS","ASLET","ASO","ASPIC","assassinate","assassination","asset","AT&T","ATF","Atlas","Attack","Attorney General","Audiotel","Austin","Authorities","AUTODIN","Avalanche","Avian","AVIP","AVN","Axis of Evil","B.D.M.","Bacteria","bank","Baranyi","Barrio Azteca","BART","basement","Basque Separatists","BATF","BBE","BCCI","bce","beanpole","BECCA","Becker","Belknap","Bellcore","Beltran-Leyva","bemd","benelux","Beyond Hope","BfV","Bin Laden","Biological","Biological event","Biological infection","Biological weapon","BITNET","blackjack","Blackout","Black out","black-bag","Black-Ops","Blackbird","Blacklisted 411","Blackmednet","Blacknet","Bletchley Park","Blister agent","Blizzard","Blowfish","Blowpipe","BLU-114/B","BLU-97 A/B","bluebird","BMDO","BND","Body scanner","bomb","Bomb squad","Bomb threat","bootleg","BOP","Border","Border Patrol","Bosnia","BOSS","Botnet","botux","Breach","Bridge","brigand","BRLO","broadside","BROMURE","Brownout","Brown out","Brush fire","Brute forcing","Bruxelles","bullion","Burn","Burst","Bush Wired","Bust","BVD","BZ","Cable & Wireless","Cain and Abel","Calderon","Cancelled","CANSLO","Cap-Stun","Capricorn","Car bomb","Cartel","Cartel de Golfo","CATO","CBM","CBNRC","CBOT","CBP","CCC","CCS","CDA","CDC","cdi","CDMA","Center for Disease Control","Central Intelligence Agency","Centro","Ceridian","CESID","CFC","chaining","chameleon man","Chan","Chelsea","Chemical","Chemical agent","Chemical burn","Chemical fire","Chemical spill","Chemical weapon","Chicago Posse","China","Chobetsu","CIA","CID","CIDA","CIKR","CIM","CIO","CipherTAC-2000","CIS","CISE","CISU","Ciudad Juarez","clandestine","class struggle","Clinton","clones","Closure","Cloud","CNCIS","Coast Guard","Cocaine","COCOT","Coderpunks","codes","Cohiba","Collapse","Colombia","colonel","Comirex","Commecen","Communications infrastructure","Competitor","Compsec","Computer infrastructure","computer terrorism","condor","Conficker","Connections","constitution","Consul","Consular","Contamination","CONUS","Conventional weapon","Cops","Cornflower","corporate security","COS","COSCO","COSMOS","counter intelligence","counter terrorism","covert video","Cowboy","CQB","CRA","cracking","Craig Livingstone","Crash","credit card","Crest","Critical infrastructure","Critical Infrastructure & Key Resources","Croatian","Crowell","cryptanalysis","Crypto AG","crypto anarchy","cryptographic","CSE","csim","csystems","CTP","CTU","CUD","Customs and Border Protection","Cyber attack","cybercash","Cyber Command","Cyber security","Cyber terror","cypherpunk","Cypherpunks","D-11","Daisy","data haven","Dateline","DATTA","David John Oates","DCJFTF","DDOS","DEA","DEADBEEF","Deaths","debugging","Decapitated","dedicated denial of service","Defcon","defense information warfare","Delays","Delta Force","Denial of service","Department of Homeland Security","DERA","DES","DEVGRP","DF","DHS","DIA","Dick Cheney","dictionary","digicash","Dirty bomb","Disaster","Disaster assistance","Disaster management","Disaster medical assistance team","distributed denial of service","DITSA","diwn","DJC","DMAT","DNDO","Dock","doctrine","DOE","Dolch","domestic disruption","Domestic nuclear detection","Domestic Nuclear Detection Office","Domestic security","Downing Street","DRA","DREC","DREO","Drill","DRM","Drug","Drug Administration","Drug cartel","Drug Enforcement Agency","Drug trade","Drug war","DSD","DSS","Duress","DynCorp","e-bomb","e-cash","E.O.D.","E.T.","E911","EADA","eavesdropping","Earthquake","Ebola","EBS","Echelon","E. Coli","Eco terrorism","EDI","EG&G","Egret","Electric","electronic surveillance","El Paso","Elvis","embassy","emc","Emergency","Emergency Broadcast System","Emergency Landing","Emergency management","Emergency response","encryption","enemy of the state","enforcers","enigma","Enriched","Environmental terrorist","EO","EOD","Epidemic","Ermes","Erosion","ESN","espionage","ETA","Etacs","eternity server","EUB","EuroFed","Europol","Euskadi ta Askatasuna","Evacuation","event security","Exon Shell","Execution","Exercise","explosion","explosive","Exposure","Extreme weather","Extremism","Exxon","FAA","Facility","Failure","FAMS","FARC","Fax encryption","FBI","FBIS","FCIC","FDA","FDM","Fedayeen","Federal Air Marshal Service","Federal Aviation Administration","Federal Bureau of Investigation","Federal Emergency Management Agency","FEMA","FINCEN","finks","FIPS140","Firefly","Firewalls","First responder","FIS","fissionable","FKS","FLAME","Flashbangs","FLETC","Flintlock","FLiR","Flood","Flu","FMD","FMS","Food Poisoning","Foot and Mouth","Forest fire","Forte","Fortezza","Fort Hancock","Fort Meade","fraud","freedom","Freeh","FSB","FSF","Ft. Bragg","Ft. Knox","Ft. Meade","FTS2000","Fundamentalism","fundamentalist","Fusion Center","FX","FXR","gamma","Gang","Gangs","Gas","Gatt","Gazprom","GCHQ","genetic","GEO","GEODSS","George W. Bush","GEOS","Geraldton","GGL","GIGN","Gist","global","Glock","GOE","Goodwin","Gorelick","gorilla","Gorizont","government","GPMG","grey data","Grid","grom","GRU","GSA","GSG-9","GSS","Guantanamo","Gulf Cartel","Gunfight","Guppy","Guzman","H&K","H.N.P.","H1N1","H5N1","Hacker","hackers","HAHO","Hail","halcon","Halibut","HALO","Hamas","HAMASMOIS","Harvard","hate","Hazardous","Hazardous material incident","Hazmat","Help","Heroin","Hezbollah","HIC","high security","Hillal","HoHoCon","Hollyhock","Hugo Chavez","Home grown","Homeland Defense","Homeland security","Honduras","Hostage","HPCC","HRT","HTCIA","Human to Animal","Human to Human","humint","Hurricane","Hutsul","IACIS","IB","ICE","ID","IDEA","IDF","IDP","IED","Illegal immigrants","illuminati","IMF","Immigration Customs Enforcement","import","Improvised explosive device","Incident","Indigo","industrial espionage","industrial intelligence","Industrial spill","Infection","Influenza","Information Security","Information Terrorism","InfoSec","infowar","Infrastructure security","Ingram Mac-10","initiative","INR","INS","INSCOM","insurgency","interception","Internet","Interstate","Intiso","investigation","Ionosphere","IRA","Iraq","IRIDF","Iris","Irish Republican Army","IRS","ISA","ISACA","ISEC","ISI","Islam Abduganievich Karimov","Iran","Islamist","ISN","Israel","ISS","IW","jack","JANET","Janet Reno","Jasmine","JAVA","Jet","JFK","Jiang Zemin","JICC","jihad","JITEM","John Kerry","JPL","JSOFC3IP","Juarez","Juiliett Class Submarine","JUWTF","Jyllandsposten","Kennedy","keyhole","Keylogger","KGB","Kh-11","Khaddafi","kibo","Kidnap","kilderkin","kilo class","KLM","Kosovo","l0ck","LABLINK","La Familia","Lacrosse","Law enforcement","Leak","Lebed","LEETAC","Legion of Doom","Leitrim","Leuken-Baden","Lexis-Nexis","LF","Lightening","Lightning","Listeria","LLC","LLNL","Lockdown","lock picking","Locks","Lon Horiuchi","Looting","Los Zetas","LRTS","LUK","lynch","M-14","M.P.R.I.","M5","M72750","Mace","Macintosh Firewalls","Macintosh Internet","Macintosh Security","Mafia","Magnitude","Mahmoud Ahmadinejad","mailbomb","Majic","Malware","Manfurov","mania","Mantis","Maple","Mara salvatrucha","Marijuana","Maritime domain awarenes","market","MARTA","Marxist","Masuda","Matamoros","Mavricks","Mayfly","MCI","MD2","MD4","MD5","MDA","Medco","mega","Mena","Menwith","Merlin","Meta-hackers","Methamphetamine","Meth Lab","Metro","Mexican army","Mexicles","Mexico","MF","MI-17","MI5","MI6","Michoacna","Middleman","military","Military Intelligence","militia","MILSATCOM","mindwar","Minox","MIT","Mitigation","MIT-LL","MITM","MOD","MOIS","mol","Mole","monarchist","Montenegro","morse","Morwenstow","Mossad","Mossberg","MP5k","MP5K-SD","MS13","MS-13","MSCJ","MSEE","MSNBC","MSW","Mudslide","Mud slide","munitions","Mutation","MYK","Mysql injection","NACSI","Narco banners","Narcos","Narcotics","NASA","NATIA","National Biosurveillance Integration Center","National Guard","national information infrastructure","National infrastructure","Nationalist","National laboratory","National Operations Center","National preparedness","National security","NATO","NATOA","NAVWAN","NAVWCWPNS","Nazi","NBIC","NCCS","NCSA","Nerve agent","New Federation","New World Order","Nigeria","NIJ","Nike","NIMA","ninja","nitrate","nkvd","NOC","NOCS","Nogales","NORAD","Noriega","North Korea","Norvo Virus","NRC","NRL","NRO","NSA","NSCT","NSG","NSP","NSWC","NTIS","NTT","nuclear","Nuclear facility","Nuclear threat","Nuevo Leon","number key","NVD","NWO","OAU","offensive information warfare","oil","Operation Iraqi Freedom","Oratory","Organized crime","Ortega","orthodox","Osama","Oscor","OSS","OTP","outage","Outbreak","Pakistan","Palestine Liberation Front","Palestine Liberation Organization","Panama","Pandemic","passwd","password","Passwords","Patel","PBX","PCS","Peering","Peking","PEM","penrep","Perl-RSA","PET","PFS","PGP","phinx","pipeline","Phishing","Phreaking","Pine Gap","pink noise","Pipe bomb","Pirates","PLA","Plague","Plame","Plane","Planet-1","Platform","PLF","PLO","Plot","Plume","plutonium","POCSAG","Police","Pork","Port","Port Authority","Power","Power lines","Power outage","PPP","PPS","pre-emptive","president","press-release","Pretoria","Prevention","primacord","PRIME","Privacy","Project Monarch","propaganda","PSAC","Pseudonyms","Psyops","PTT","Public Health","Putin","Qaddafi","Quarnantine","quarter","quiche","r00t","racal","radar","Radiation","Radicals","Radioactive","RAID","rail gun","Rand Corporation","Rapid Reaction","RCMP","rebels","Recall","Recce","Recovery","Recruitment","Red Cell","Red Cross","red noise","Reflection","Relief","remailers","ReMOB","Reno","replay","Resistant","Response","Retinal Fetish","Reynosa","Reyosa","RFI","rhost","Ricin","Riot","RIT","RL","rogue","Rolm","Ron Brown","Ronco","Rootkit","Roswell","rs9512c","RSA","RSP","Rubin","Ruby Ridge","Rule Psix","Rumsfeld","RUOP","RX-7","S Box","S Key","S.A.I.C.","S.E.T. Team","S/Key","SABC","SACLANT","Saddam Hussein","SADF","SADMS","SAFE","Salmonella","San Diego","SAP","SAPO","SAR","Sarin","SASP","SASR","satellite imagery","Saudi Arabia","SBI","SBIRS","SBS","Scammers","SCIF","Screening","SCUD missile","Scully","SDI","SEAL","SEAL Team 6","Sears Tower","Secret Service","secure","Secure Border Initiative","Secure Internet","secure shell","security","Security Consulting","Security Council","Security Evaluation","SEL","Semtex","Serbian","SERT","Service disruption","SETA","SGC","SGDN","SGI","SHA","SHAPE","Shayet-13","Shell","Shelter-in-place","SHF","Shooting","Shootout","Shots fired","Sick","SIG","SIGDASYS","SIGDEV","sigvoice","SIN","Sinaloa","SIRC","SISDE","SISMI","Skipjack","Skytel","SL-1","Sleet","SLI","SLIP","Smallpox","Small Pox","Smart","smuggle","smugglers","Smuggling","sneakers","sniper","Snow","Social media","Somolia","SONANGOL","Sonora","Soros","South Africa","Southwest","Soviet","SP4","Spammer","Speakeasy","speedbump","Spetznaz","spies","Spillover","spook","spy","Spyderco","squib","SRI","ssa","SSCI","SSL","stakeout","Standford","Standoff","STARLAN","State of emergency","Stego","STEP","Steve Case","Storm","Strain","Stranded","strategic","Stuck","subversive","Subway","Sugar Grove","Suicide attack","Suicide bomber","SUN","Sundevil","supercomputer","SURVIAC","SUSLO","Suspicious device","Suspicious package","Suspicious substance","SVR","SWAT","sweep","sweeping","Swine","SWS","Symptoms","Syria","Taiwan","Talent","Taliban","Tamaulipas","Tamiflu","Tamil Tigers","target","Task Force","TB","TDM. SUKLO","TDR","TDYC","Tehrik-i-Taliban Pakistan","Telecommunications","Telex","TELINT","Temblor","tempest","Templeton","TEMPSET","Terror","terrorism","Terrorism Defensive Information","terrorist","TEXTA. ELF","THAAD","threat","Ti","TIE","Tijuana","Tony Blair","top secret","Tornado","Torreon","Toxic","Trafficking","Transportation security","Transportation Security Administration","TRD","Treasury","Tremor","Trojan","Trump","TRW","TSA","TSCI","TSCM","Tsunami","Tsunami Warning Center","TTP","Tuberculosis","Tucson","TUSA","TWA","Twister","Typhoon","UDT","UFO","UHF","UKUSA","UMTS","UN","unclassified","UNCPCJ","undercover","underground","United Nations","Unix Security","UNSCOM","UOP","USACIL","USAFA","USCG","U.S. Citizenship and Immigration Services","USCODE","USCOI","U.S. Consulate","USDOJ","USP","USSS","UT/RUS","utopia","UTU","UXO","Uzbekistan","Uzi","Vaccine","Venezuela","Verisign","VHF","Vickie Weaver","Vince Foster","Vinnell","Violence","VIP Protection","Virii","virtual","Virual Hemorrhagic Fever","virus","VLSI","VNET","Wackendude","Wackenhut","Waco, Texas","Waihopai","War on Terrorism","warfare","Warning","Watch","Water borne","Watergate","Wave","Weapons cache","Weapons grade","weapons of mass destruction","White House","white noise","White Powder","White Water","Whitehouse","WHO","Wildfire","William Gates","WINGS","wire transfer","WMATA","world domination","World Health Organization","World News","World Trade Center","Worm","xecutive","XS4ALL","Yakima","Yemen","Yobie","Yukon","Yuma","Zachawi"]; let string = ''; for(i = 0; i < num; i++) { string += spooks[Math.floor(Math.random() * spooks.length)] + ' '; } return string; }); Posted
1 2 3 4 5