« first day (816 days earlier)      last day (4349 days later) » 
03:00 - 17:0017:00 - 00:00

04:00
@ShaquinTrifonoff You ought to check out the other things on mrdood.com... Tadpoles :P Canvas is an awesome thing... Guys like you who have a creative mind will find this very nice...
@ShyamK Check out this one
deviantart has the same thing at sta.sh
 
1 hour later…
05:28
 
5 hours later…
10:28
test
good morning
Good Morning!
10:39
@AndréSilva hi
Hehe
I'm trying to make a Good morning script
Just trying to get the User name that said Good morning.
Btw @ShaquinTrifonoff Hi. :)
@AndréSilva Interesting....
Maybe a regex like /^(good )?morni[ng]{0,2}'?$/i?
Holy...
/gi is just for whole word right ?
@AndréSilva i makes it case-insensitive, and g makes it a global search
In c# $ makes it whole word and ^ = not ._.
11:16
good morning
@ShaquinTrifonoff I'm going to use your regex. Thanks for sharing. :)
11:59
Good morning.
good morning
:undefined Good Morning
12:15
good morning
@AndréSilva Good Morning
GoOd MoRnInG
@AndréSilva Good Morning
BLABLABLA GOOD MORNING BLABLABLA
Good morning all.
Good morning!
eh..
good morning
@AndréSilva Good Morning
Good morning
@AmaanCheval Good Morning
You're running it manually now, right?
12:21
Yep
The regex @ShaquinTrifonoff gave me just works if the person say just good morning.
@AndréSilva Good Morning
Yeah, if the person say Good morning in any place, the function works
@AndréSilva Good Morning
Now it is working.. But I put a simple test... /good morning/gi
Hm.. but I think it will have some problems..
Good morning, bot!
@AmaanCheval Good Morning
Imagine two people using this script..
@First Good Morning.
Hahaha, yeah
@Second Good Morning.
@First Good Morning.
:D It will be amazing
Maybe if I check if the person said Good Morning and not contain any @
12:27
Yeah, I'm working on a bot script
To say Good morning whenever someone says good morning
Example :
Say good morning ..
Based on Zirak's bot or your own implementation?
Good morning.
@OctavianDamiean Good Morning
By bot I say, a script that runs on your own user just to say Good morning.
As does Zirak's bot. :D
12:29
Ziraks bot says good morning ? :(
'cept it doesn't greet you.
It can insult you though.
In your face Zirak
  var elements = document.getElementsByTagName('*');
  var newElements = [];

  for (var i = elements.length - 1; i > 0; i--) {
    if (/content/gi.test(elements[i].className)) {
      newElements.push(elements[i]);
      i = 0;
    }
  }

  var person = newElements[0].parentNode.parentNode.childNodes;
  var personReply;

  for (var j = 0; j < person.length; j++) {
    if (person[j].className == 'message') {
      personReply = person[j].id.replace('message-', '');
    }
  }

  if (/good morning/gi.test(newElements[0].innerHTML)) {
Oh holy shit.
That's like really triggering the actual form. :D
12:31
Yeah, I have no idea how to do differently..
Post the message to the server like the form does.
How are you listening for messages?
Do you actually inspect the DOM tree for new messages?
I tryed working with setTimeout.. but it doesn't trigger the function
It just read the elements and check for the last message inputted..
You could also just establish a websocket connection and get the new messages directly. :)
A lot more efficient and easier to implement.
calm down ._. I can barely make a setTimeout work..
How would I do that ?
With JS only ._.
You send a post request to the authentication service containing your fkey and get a websocket url back.
Then you establish a websocket connection and listen for the messages.
Actually for the events. There's four event types.
12:36
Theory = heaven and rainbows
Practice = hell and fire.
I forgot what each stands for but luckily I've noted them down at home.
Nah, it's not that complicated. Did it too.
lol. I'm over populating this chat :D
Can't sleep, sorry. :)
good morning test.
Mhmm, Badger Girl. Interesting. I like badgers since you can install Linux on them.
12:39
Haha. When I set a function to my script, it doesn't trigger..
function Greet() {
  var elements = document.getElementsByTagName('*');
  var newElements = [];

  for (var i = elements.length - 1; i > 0; i--) {
    if (/content/gi.test(elements[i].className)) {
      newElements.push(elements[i]);
      i = 0;
    }
  }

  var person = newElements[0].parentNode.parentNode.childNodes;
  var personReply;

  for (var j = 0; j < person.length; j++) {
    if (person[j].className == 'message') {
      personReply = person[j].id.replace('message-', '');
    }
  }
any one know phonegap?
Hahaha, you're asking in the Sandbox?
@Stack I know PhoneGap too! Awesome! Wanna be friends?
That was super mean. :(
12:43
I'm known to be mean.
Ask Amaan.
Wait, what?
But all the JS people are mean.
If you'd said that in the JS room, I'd bin the message :p
@BadgerGirl Thanks to you I get mrweebls music stuck in my head everytime I read your name. :(
I think of Badger Badger Badger Mushroom Snake!
12:44
The Badger Mushroom song?
haha
Lol. That's awesome. I thought of the name because of the song.
Badger Badger Badger Badger Mushroom Mushroom
Since my phones 3g sucks and my company doesn't allow me into youtube..
I'm singing in my head ..
@BadgerGirl We know we're awesome. We're JS developers.
12:46
Zirak is the awesomest.
We're also not snooty at all.
and copy
So you're saying that all JS developers are awesome? @OctavianDamiean
Of course.
And Loktar, but only for what he did yesterday.
12:47
If you developer for/with JS you are awesome by definition.
What'd he do?
JS Developers = Awesome;
Awesome = Me;
Me = C# Developer;
JS Developers = C# Developers;
No.
Only the activity involving JS development makes you awesome.
x = y
y = z
z = a
a = x...
Whenever you do something else you're not being awesome.
12:48
@OctavianDamiean yes
I can't be. I am.
I wann to be ur frnd
He made Kirsty change her profile picture.
hurr durr..
@BadgerGirl Ah, yeah
12:49
while (developingJS) { awesome = true; }
@OctavianDamiean
@Stack I know I'm awesome. Thanks.
hey Stack, I'll be your friend if you don't have any.
@BadgerGirl What if he has friends?
12:53
Watch out though, she's a badger.
YOU'RE MEAN, BADGER GIRL, MEAN!
@BadgerGirl I am waiting 4 ur friendship
Don't you have friends?
u r first one
Hello
12:55
lol how sad.
grants @Stack one friendship. There you go buddy, enjoy.
+1
frndshp club ?
When I didn't have a friend, Zirak's bot kept me company.
Yes, we're distributing friendships.
@BadgerGirl waiting 4 ur
12:56
"response"
@BadgerGirl Just give it to him!
Oooooooh
:D
escaping doesn't work !
copy is my boyfriend, sorry.
12:58
@BadgerGirl shall we become frnds?
:(
@BadgerGirl @AmaanCheval u left ? @Stack
Yeah, you were too boring
13:02
:( ok me 2 going
wt?
i thought u left
lol, you gotta love text speak ...
who?
13:03
img not found
Stop being mean.
elaborate
@BadgerGirl reply pls
staring unnecessary posts may lead to delete this room.
@BadgerGirl ?
13:07
@BadgerGirl You feel offended? I'm sorry then.
Hahahaha
I do. :(
Well, life's a bitch.
But thanks for apologizing.
It was truly from heart.
13:08
It looks like it.
@BadgerGirl u don't want to talk?
She's talking already, can't you see it?
What are you expecting? You want to hear a poem from her?
@OctavianDamiean Stop being mean.
@BadgerGirl ?
:D
13:11
I'm not mean, I'm merely trying to find out what he expects. ;)
In a very special way, I'll admit but I don't care.
I love that guy.
nice
@SOChatBot You retarded? Take off that Christmas hat ... it's not Christmas anymore. -_____-
13:14
@rlemon ^^
!!/hang
!!/ban AndréSilva
Could not process input. Error: Object NaN has no method 'replace'
+---+
| |
|
|
|
__+__

--------
lawdy
!!/hang e
  +---+
  |   |
  |
  |
  |
__+__
e
---e---e
@AmaanCheval Could not process input. Error: Object NaN has no method 'replace'
13:16
!!/hang t
!!/listcommands
@AmaanCheval 420, 5318008, help, listen, eval, live, die, refresh, forget, ban, unban, info, jquery, choose, user, listcommands, purgecommands, define, norris, urban, parse, tell, mdn, get, learn, bewbs, i_am_a_robot, aliens, ym, format, happynewyear, tell2, 3point14, camel, echo, ihatelanadelrey, fa, vk1, vk2, rlhd, convert, nudge, undo, timer, stat, beautify, hang, todo, google, spec
+---+
| |
| O
|
|
__+__
e, t
---e---e
!!/hang r
  +---+
  |   |
  |   O
  |   |
  |
__+__
e, r, t
---e---e
!!/hang n
13:16
no your retarded
!!/ban 1322469
!!/ban
You ruined my hangman :(
Na, the bot's hanging
13:17
I can't see it :(
Get it? GET IT?
Fuckity fuck
that was uncalled for
@rlemon, I got a challenge for you.
!!s/your/you're/
13:19
typo rum, funny chat
!!/refresh
@AmaanCheval Unban me :(
You weren't banned
x = (a == b ? a : b)
The bot just didn't respond from then on
13:20
._.
@rlemon What's happening?
!!/hang s
what is bot ? @AmaanCheval
!!/hang s
@blue Baby don't hurt me.. don't hurt me..
13:21
OMG. Who killed it? :(
It'll be back in 10-15
Amaan killed it :(
Bots need to take leaks too
ok
@AmaanCheval 15 mins over ?
The bot got me a boyfriend.
13:21
Uhh, no?
@BadgerGirl Who? copy?
@BadgerGirl congo
But he leaves today. :(
18 mins ago, by blue
staring unnecessary posts may lead to delete this room.
in JavaScript, 39 secs ago, by rlemon
damn, this is what happens when the bot runs for like 3 weeks without a browser refresh
13:23
agree
horrible silence
13:38
k bye all
@AmaanCheval @BadgerGirl c u later, tc
@BadgerGirl bye have a sweet dream
13:51
@BadgerGirl
 
1 hour later…
14:57
Good morning
@AndréSilva Good Morning
@AndréSilva Good Morning
@AndréSilva Good Morning
lalalalala
Good Morning to everyone :D
@AndréSilva Good Morning
kjashdkjahdsa
15:58
So..
This is what I do: bot.xhr("POST", "/ws-auth", "roomId=" + bot.roomId + "&fkey=" + bot.fkey, bot.onWsauth);
First things first. /ws-auth is somekind of web service security right ?
It's just the url to request a websocket url from
Where do I retrieve that.
I love new stuff ._.
POST a XHR to /ws-auth with a content of "roomId=7&fkey=" + fkey().fkey
You can change the roomId to any room you want.
You will get back a JSON string containing a url property.
Use that url to connect to the WebSocket.
16:03
        var xmlhttp;
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        } else {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

            }
        }

        xmlhttp.open("POST", "/ws-auth#roomId=7&fkey=" + fkey().fkey, true);

        xmlhttp.setRequestHeader("Content-Type", "application/json;charset=utf-8");
        xmlhttp.send();
Ops
._.
That returned me a type/HTML :(
Hm I think I see..
The url is wrong right ? ._.
The URL is "/ws-auth", and the content is "roomId=7&fkey=" + fkey().fkey"
You would send the content in the send method, instead of the open method.
        var xmlhttp;
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        } else {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
               console.log(xmlhttp.responseText);
            }
        }

        xmlhttp.open("POST", "/ws-auth", true);

        xmlhttp.setRequestHeader("Content-Type", "application/json;charset=utf-8");
Your content type should also be "application/x-www-form-urlencoded"
Sorry for that. Lack of attention
@copy <3
16:08
^
Ok. Got a json with URL : ws://
and lots of stuff after..
That's the one!
o/ Hell yeah
new WebSocket(JSON.parse(xmlhttp.responseText).url)
Nothing happened. But I think that is right..
16:11
You have to listen for events.
For starters, log all the messages coming through the socket.
console.log ALL THE THINGS !
But how do I do that ? if you get annoyed answering every stupid question I do, feel free to tell me to fuck off
Set a callback on socket.onmessage.
BTW, MDN can help here.
MDN? ._.
Mozilla.
        var xmlhttp;
        if (window.XMLHttpRequest) {
          xmlhttp = new XMLHttpRequest();
        } else {
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function () {
          if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            StartWS(xmlhttp.responseText);
          }
        };

        xmlhttp.open("POST", "/ws-auth", true);

        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
@KendallFrey What am I doing wrong ?
Forget the big chunk of crap in the chat, follow the links.
._.
brb.
@AndréSilva Are you trying to send "hello" as a message?
16:34
._. Just to see what returns
Do I need to send a specific key ? ._.
On mozilla just say to send a json parsed string
You don't need to send anything to the server with WebSocket.
It's only for events coming from the server.
So when I instanciate a websocket, automatically connect in the server?
Hm.. I think this isn't returning anything because I'm running this idiot websocket in this room --'
Yup, if you test it in here, roomId should be 1.
16:39
Well.. I get nothing..
You get nothing from what?
No events?
Nothing logged..
WS.onmessage = function(text) { console.log(text); }
        var xmlhttp;
        if (window.XMLHttpRequest) {
          xmlhttp = new XMLHttpRequest();
        } else {
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function () {
          if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            StartWS(xmlhttp.responseText);
          }
        };

        xmlhttp.open("POST", "/ws-auth", true);

        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
I think I'm going to log on onmessage "Every move you make, every step you take, I'll be listening you"
Nothing is logged? That seems strange.
Do you get the Connection Open! message?
16:41
Nope
._.
Try logging something in onclose or onerror.
No errors, just undefined after code is entered.
Yep, I get closed
See if I can recall what caused that...
Try xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
I have no idea if that affects it.
CloseEvent {reason: "", code: 1006, wasClean: false, clipboardData: undefined, cancelBubble: false…}
Same thing.
Closed - CloseEvent
Try logging WS.url
16:45
ws://sockets.or.stackexchange.com/events/1/8b3f1b6633bc459fa3bd496d1ab5ac77
Just as a test, try appending "?l=14118886" to the url before you pass it.
By URL you mean the ws url ?
      var WS = new WebSocket(JSON.parse(response).url + "?l=14118886");
If yes, same error.
On second thought, just use "?l=99999999"
Shouldn't be much difference though.
16:48
Same error ._.
I read in SO question that increasing timeout time makes it work and it is a bug presented in FF.. but I'm in Chrome.
I was just about to ask what browser you're using.
Is there a problem with Chrome and websockets?
Not that I know of.
:( So, I'm screwed ?
Probably not.
16:52
And reason returns ""
Try not sending anything over WS
I'm not sending anything ._.
This is what I last sended to chrome
Your code shows that you were.
I don't see anything wrong.
Can you run that code and see what happens ?
brb 1 sec clients..
03:00 - 17:0017:00 - 00:00

« first day (816 days earlier)      last day (4349 days later) »