Alright, i have question; why the heck is my javascript code notrunning? now let me explain...Im working on an IRC app for users who don't like the irc apps alreadyout there for various reasons. (none of the ones i found were anygood). If you have a link to a fully working chrome app that does anyirc server, remembers the text previously sent, and has a good theme,ignore the rest of the message and tell me. However, i doubt thatthere is one, so...Alright, I have a folder named js in my extension folder containing"jerkirc.js", and I have a html file with the name "jerkirc.html" inthe main folder. I'm trying to get my javascript code to run. Anythingi tried fails. Its simply not running ANY javascript that i write.I would also love if you guys could help me fix the actuallyjavascript irc code stufs, but that's secondary.Here's the javascript code;
Code:
if (POSTDATA["username"] != undefined)       var usernick = POSTDATA["username"];if (POSTDATA["password"] != undefined)       var userpass = POSTDATA["password"];"if (POSTDATA["server"] != undefined)       var server = POSTDATA["server"];if (POSTDATA["port"] != undefined)       var port = POSTDATA["port"];Document.Write('Connecting to ' + server + ':' + port)var net = require('net'),       irc = {}, config;config = {       user: {               nick: usernick,               user: usernick,               real: usernick,               pass: userpass       },       server: {               addr: server,               port: port       },       chans: ['#BotDev', '#BotDev2']}irc.socket = new net.Socket();irc.socket.on('data', function(data){       data = data.split('\n');       for (var i = 0; i < data.length; i++)       {               console.log('RECV -', data[i]);               if (data !== '')               {                       irc.handle(data[i].slice(0, -1));               }       }});irc.socket.on('connect', function(){       console.log('Established connection, registering and stuff...');       irc.on(/^PING :(.+)$/i, function(info)       {               irc.raw('PONG :' + info[1]);       });       setTimeout(function()       {               irc.raw('NICK ' + config.user.nick);               irc.raw('USER ' + config.user.user + ' 8 * :' + config.user.real);               setTimeout(function()               {                       for (var i = 0; i < config.chans.length; i++)                       {                               irc.join(config.chans[i]);                       }               }, 2000);       }, 1000);});irc.socket.setEncoding('ascii');irc.socket.setNoDelay();irc.socket.connect(config.server.port, config.server.addr);//handles incoming messagesirc.handle = function(data){       var i, info;       for (i = 0; i < irc.listeners.length; i++)       {               info = irc.listeners[i][0].exec(data);               if (info)               {                       irc.listeners[i][1](info, data);                       if (irc.listeners[i][2])                       {                               irc.listeners.splice(i, 1);                       }               }       }}irc.listeners = [];irc.on = function(data, callback){       irc.listeners.push([data, callback, false])}irc.on_once = function(data, callback){       irc.listeners.push([data, callback, true]);}irc.raw = function(data){       irc.socket.write(data + '\n', 'ascii', function()       {               console.log('SENT -', data);       });}
and here is the embedding html code; (i have the paths figured out,and the index.html file (not shown) properly passes on its variables)
HTML Code:
                      JerkIRC                             function setfocus() {                       //select the username textbox for quick typing access                       document.text.text.focus();               }
so if anyone can help me to get my javascript code running, that wouldbe wonderful.