Omnimaga

General Discussion => Technology and Development => Web Programming and Design => Topic started by: Jim Bauwens on April 07, 2011, 03:46:34 pm

Title: Unofficial omnomIRC extension
Post by: Jim Bauwens on April 07, 2011, 03:46:34 pm
I made an unofficial extension for omnomIRC to chat with colors

Add a bookmark in your bookmark bar with this url:
Code: [Select]
javascript:sig = AJAXSend.toString().split("\n")[21].split("&")[1];usern = AJAXSend.toString().split("\n")[21].split("&")[0].split("\"")[3];setTimeout('function AJAXSend() {
window.frames[0].onMessageSend();window.frames[0].timeIn();var msg_me=document.getElementById("message").value;msg_me = msg_me.replace("[bold]","\x02");msg_me = msg_me.replace("[normal]","\x0F");msg_me = msg_me.replace("[red]","\x0304");msg_me = msg_me.replace("[blue]","\x0302");msg_me = msg_me.replace("[green]","\x0303");msg_me = msg_me.replace("[color]","\x03");var theURL = "/omnomirc/messagebounce.php?name=" + encodeURIComponent(encodeURIComponent(usern)) +"&"+ sig + "&message=" + encodeURIComponent(encodeURIComponent( stripslashes( stripslashes( msg_me ))));document.getElementById("message").value = "";xmlhttp=new XMLHttpRequest();xmlhttp.open("GET", theURL ,false);xmlhttp.send(null);
}',1000);


When you are on  a omnimaga page, click it, and you will be able to use tags like
Code: [Select]
[red] [green] [blue] [color]00-15 [bold] and [normal] in omnomIRC.

If anyone of the mods doesn't like this, I will remove it.

EDIT: New version with firefox support, scroll down to see it!
Title: Re: Unofficial omnomIRC extension
Post by: Munchor on April 07, 2011, 03:50:05 pm
I made an unofficial extension for omnomIRC to chat with colors

Add a bookmark in your bookmark bar with this url:
Code: [Select]
javascript:sig = AJAXSend.toString().split("\n")[21].split("&")[1];usern = AJAXSend.toString().split("\n")[21].split("&")[0].split("\"")[3];setTimeout('function AJAXSend() {
window.frames[0].onMessageSend();window.frames[0].timeIn();var msg_me=document.getElementById("message").value;msg_me = msg_me.replace("[bold]","\x02");msg_me = msg_me.replace("[normal]","\x0F");msg_me = msg_me.replace("[red]","\x0304");msg_me = msg_me.replace("[blue]","\x0302");msg_me = msg_me.replace("[green]","\x0303");msg_me = msg_me.replace("[color]","\x03");var theURL = "/omnomirc/messagebounce.php?name=" + encodeURIComponent(encodeURIComponent(usern)) +"&"+ sig + "&message=" + encodeURIComponent(encodeURIComponent( stripslashes( stripslashes( msg_me ))));document.getElementById("message").value = "";xmlhttp=new XMLHttpRequest();xmlhttp.open("GET", theURL ,false);xmlhttp.send(null);
}',1000);


When you are on  a omnimaga page, click it, and you will be able to use tags like
Code: [Select]
[red] [green] [blue] [color]00-15 [bold] and [normal] in omnomIRC.

If anyone of the mods doesn't like this, I will remove it.

IT WORKED, IT WORKED, I LOVED IT.

JimBauwen is JavaScript GOD around here :D
Title: Re: Unofficial omnomIRC extension
Post by: Eeems on April 07, 2011, 04:24:39 pm
JimBauwen is JavaScript GOD around here :D
What about my javascript godlyness?
Title: Re: Unofficial omnomIRC extension
Post by: Munchor on April 07, 2011, 04:25:35 pm
JimBauwen is JavaScript GOD around here :D
What about my javascript godlyness?

jBasicOS and Eee:Zor and awesome too, I didn't forget about you :)
Title: Re: Unofficial omnomIRC extension
Post by: Darl181 on April 07, 2011, 07:25:44 pm
I just tried it, and it doesn't work ???
What happens when I click the bookmark is a new, blank page opens saying nothing but "3"
Does it work properly in firefox 4?

EDIT: tried it in chrome, and it works there
Title: Re: Unofficial omnomIRC extension
Post by: ztrumpet on April 07, 2011, 07:48:50 pm
Yeah, it doesn't work in my version of Firefox either. :(
Title: Re: Unofficial omnomIRC extension
Post by: DJ Omnimaga on April 07, 2011, 07:49:44 pm
That doesn't work in Opera 11 either on Windows. Also I kinda worry people will abuse colors.
Title: Re: Unofficial omnomIRC extension
Post by: Juju on April 07, 2011, 07:55:33 pm
Thanks Jim, I'll install it as a GreaseMonkey-like script. Actually, I'll convert it as a GreaseMonkey script and share the link with you.
Title: Re: Unofficial omnomIRC extension
Post by: Netham45 on April 07, 2011, 08:06:05 pm
Just saying, I left colors and such out of OmnomIRC for a reason.
Title: Re: Unofficial omnomIRC extension
Post by: Juju on April 07, 2011, 08:25:09 pm
Well, people don't abuse on IRC, even if there's color buttons everywhere.

BTW you can click here (http://files.julosoft.net/js/omnomirc_colors.user.js) to install it if you have GreaseMonkey or Tampermonkey.

Edit: seems it doesn't work right.
Title: Re: Unofficial omnomIRC extension
Post by: mikehill2003 on April 07, 2011, 08:28:22 pm
Well, people don't abuse on IRC, even if there's color buttons everywhere.

I'm pretty sure they are referring to my juvenile response to finding the Ctrl+K command in XChat today.
Title: Re: Unofficial omnomIRC extension
Post by: Darl181 on April 07, 2011, 11:47:50 pm
BTW you can click here (http://files.julosoft.net/js/omnomirc_colors.user.js) to install it if you have GreaseMonkey or Tampermonkey.

Edit: seems it doesn't work right.
Yeah, it doesn't work :/
That in firefox 4 at least, using greasemonkey
Title: Re: Unofficial omnomIRC extension
Post by: Jim Bauwens on April 08, 2011, 04:28:19 am
Update, this should work both in Chrome and firefox:
Code: [Select]
javascript:void(sig = AJAXSend.toString().split("\"")[25]);void(usern = AJAXSend.toString().split("\"")[23]);function sendit() {window.frames[0].onMessageSend();window.frames[0].timeIn();msg_me=document.getElementById("message").value;msg_me = msg_me.replace(/\[bold\]/g,"\x02");msg_me = msg_me.replace(/\[normal\]/g,"\x0F");msg_me = msg_me.replace(/\[red\]/g,"\x0304");msg_me = msg_me.replace(/\[blue\]/g,"\x0302");msg_me = msg_me.replace(/\[green\]/g,"\x0303");msg_me = msg_me.replace(/\[color\]/g,"\x03");var theURL = "/omnomirc/messagebounce.php?name=" + encodeURIComponent(encodeURIComponent(usern)) + sig + "&message=" + encodeURIComponent(encodeURIComponent( stripslashes( stripslashes( msg_me ))));document.getElementById("message").value="";xmlhttp=new XMLHttpRequest();xmlhttp.open("GET", theURL ,false);xmlhttp.send(null);};void(document.irc.setAttribute('onsubmit','sendit()'));
Edit: fixed something
Edit2:  DJ_0, I don't know if trolls will use it, because it isn't so easy to do, and anyway trolls need 40 posts to chat.
Title: Re: Unofficial omnomIRC extension
Post by: jnesselr on April 08, 2011, 07:33:09 am
I wish this was integrated into omnomIRC by default when you get 1000 posts. :D
Title: Re: Unofficial omnomIRC extension
Post by: Eeems on April 08, 2011, 09:41:05 am
JimBauwen is JavaScript GOD around here :D
What about my javascript godlyness?

jBasicOS and Eee:Zor and awesome too, I didn't forget about you :)
yay! :D

This is looking good :) I'll have to test it out when I get on my comp later today.
Title: Re: Unofficial omnomIRC extension
Post by: Munchor on April 08, 2011, 09:58:22 am
I wish this was integrated into omnomIRC by default when you get 1000 posts. :D

I agree, that's a good "prize", but make it 3000 :P
Title: Re: Unofficial omnomIRC extension
Post by: Stefan Bauwens on April 08, 2011, 10:39:48 am
I wish this was integrated into omnomIRC by default when you get 1000 posts. :D

I agree, that's a good "prize", but make it 3000 :P
Thats easy to say with your post count :P
Title: Re: Unofficial omnomIRC extension
Post by: Munchor on April 08, 2011, 10:40:29 am
I wish this was integrated into omnomIRC by default when you get 1000 posts. :D

I agree, that's a good "prize", but make it 3000 :P
Thats easy to say with your post count :P

It is, isn't it? :P
Title: Re: Unofficial omnomIRC extension
Post by: jnesselr on April 08, 2011, 03:29:17 pm
I wish this was integrated into omnomIRC by default when you get 1000 posts. :D
I agree, that's a good "prize", but make it 3000 :P
Thats easy to say with your post count :P
It is, isn't it? :P
So 1337 posts it is...