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

4:00 AM
@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…
5:28 AM
 
 
5 hours later…
10:28 AM
test
good morning
Good Morning!
 
10:39 AM
@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 AM
good morning
@ShaquinTrifonoff I'm going to use your regex. Thanks for sharing. :)
 
11:59 AM
Good morning.
good morning
:undefined Good Morning
 
12:15 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
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 PM
@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 PM
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 PM
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 PM
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 PM
"response"
 
@BadgerGirl Just give it to him!
 
Oooooooh
 
:D
escaping doesn't work !
 
copy is my boyfriend, sorry.
 
12:58 PM
@BadgerGirl shall we become frnds?
 
Yes.
 
Ok.
 
:(
@BadgerGirl @AmaanCheval u left ? @Stack
 
Yeah, you were too boring
 
1:02 PM
:( ok me 2 going
 
wt?
 
i thought u left
 
lol, you gotta love text speak ...
 
who?
 
1:03 PM
img not found
 
Stop being mean.
 
elaborate
 
@BadgerGirl reply pls
 
staring unnecessary posts may lead to delete this room.
 
@BadgerGirl ?
 
1:07 PM
@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.
 
1:08 PM
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
 
1:11 PM
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. -_____-
 
1:14 PM
@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'
 
1:16 PM
!!/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
 
1:16 PM
no your retarded
 
!!/ban 1322469
 
!!/ban
 
You ruined my hangman :(
 
Na, the bot's hanging
 
1:17 PM
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/
 
1:19 PM
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
 
1:20 PM
._.
 
@rlemon What's happening?
 
!!/hang s
 
what is bot ? @AmaanCheval
 
!!/hang s
 
@blue Baby don't hurt me.. don't hurt me..
 
1:21 PM
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.
 
1:21 PM
Uhh, no?
@BadgerGirl Who? copy?
 
Yes.
 
@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
 
1:23 PM
agree
horrible silence
 
1:38 PM
k bye all
@AmaanCheval @BadgerGirl c u later, tc
 
Bye
 
@BadgerGirl bye have a sweet dream
 
1:51 PM
@BadgerGirl
 
 
1 hour later…
2:57 PM
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
 
3:58 PM
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.
 
4:03 PM
        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
 
4:08 PM
^
 
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..
 
4:11 PM
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.
 
True.
 
        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?
 
4:34 PM
._. 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?
 
Yeah.
 
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.
 
4:39 PM
Well.. I get nothing..
 
You get nothing from what?
No events?
 
Nothing logged..
WS.onmessage = function(text) { console.log(text); }
 
code?
 
        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?
 
4:41 PM
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
 
4:45 PM
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 ?
 
Yeah.
 
      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.
 
4:48 PM
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.
 
4:52 PM
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 (4127 days later) »