#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2014-10-26

Timestamps are in GMT/BST.

00:04:44Destroyerimo has joined
00:07:48Destroyerimo_clo Quit (Ping timeout: 256 seconds)
00:08:29Destroyerimo_clo has joined
00:09:17Destroyerimo Quit (Ping timeout: 260 seconds)
00:17:13Destroyerimo_clo Quit (Ping timeout: 260 seconds)
00:56:08fordcarsNight!
00:56:10fordcars Quit (Quit: Page closed)
00:58:52amgine123good night
01:03:13amgine123 Quit (Ping timeout: 246 seconds)
01:22:07Nothing_Much Quit (Ping timeout: 272 seconds)
01:40:37Nothing_Much has joined
07:08:15Darrel Quit (Read error: Connection reset by peer)
07:12:01Darrel has joined
08:56:43Raven67854 Quit (Ping timeout: 260 seconds)
08:57:13Raven67854 has joined
10:43:59Raven67854 Quit (Ping timeout: 245 seconds)
10:57:45Raven67854 has joined
11:50:06LordDVG has joined
13:09:25fordcars has joined
13:10:29fordcarswatusimoto: When trying to access bitfighterStatus.json from a web browser, I get a no-cross-origin error because "'Access-Control-Allow-Origin' header is present on the requested resource". Is there anyway to make this work?
13:11:02fordcarsSorry, "No 'Access-Control-Allow-Origin' header is present on the requested resource"
13:12:08sam686you can see http://bitfighter.org/bitfighterStatus.json directly, right?
13:12:17fordcarsYes
13:12:21fordcarsWait, I think this is my fault
13:12:28fordcarsSorry!
13:13:09sam686the problem might be that your html script tries to access a different website which some browsers block
13:14:22fordcarsYeah, it was doing that
13:31:53fordcarsIt looks like bitfighte.orgr doesn't allow Access-Control-Allow-Origin
14:50:03LordDVG Quit (Remote host closed the connection)
15:47:40Raven67854 Quit (Remote host closed the connection)
17:04:50raptor has joined
17:04:50ChanServ sets mode +o
17:06:58raptorfordcars: that access-origin-thingy is because of restictive controls that all web-sites have with pulling data from other sites
17:07:18raptorthe solution is to use JSONP which is a workaround method. see the second answer here: https://stackoverflow.com/questions/6396623/jquery-getjson-access-control-allow-origin-issue
17:07:47fordcarsThanks I'll check it out
17:08:14raptorif you use jquery, then i think there is a simple method to use jsonp with...
17:38:50fordcarsraptor: I am sending this: http://bitfighter.org/bitfighterStatus.json?callback=dataReceived
17:39:06raptorare you using jquery?
17:39:14fordcarsNo, it's simple without it
17:39:48fordcarsBut I am not getting anything
17:39:58raptoryou have to handle it special
17:40:22fordcarsI am (I think); bitfighter.org should give me a method, but it's not
17:40:42raptori don't actually remember how to do it with normal JS... I've been using jquery for years...
17:40:46fordcarsI am setting the src of a <script> to that, and I should get a method
17:41:00fordcarsscript.src = c.statusUrl + "?callback=" + c.callback;console.log(script.src);
17:41:08fordcarsWithout the log haha
17:42:07raptorhere is an example: https://stackoverflow.com/questions/6132796/how-to-make-a-jsonp-request-from-javascript-without-jquery
17:42:45fordcarsOh, you have to add it to the html?
17:42:55fordcarsI'll try it out
17:46:38fordcarsOh sweet it works!
18:00:24raptoroh good
18:02:35fordcarsNever mind :x
18:02:44fordcarsI keep getting the json itself, not a method
18:03:01raptorthat's what you want, right?
18:03:41fordcarsWell, JSONP is supposed to callback a method, giving as an argument the json object
18:03:48fordcarsThis is what I am sending: http://bitfighter.org/bitfighterStatus.json?callback=dataReceived
18:03:59fordcarsIt's supposed to call dataReceived()
18:04:39fordcarsBut when it interprets the supposedly javascript, it fails because it's json
18:05:23fordcarsIt interprets http://bitfighter.org/bitfighterStatus.json?callback=dataReceived as if it was a .js file
18:05:45fordcarswith dataReceived({servers: blabablbalba}); in it
18:05:50fordcarsWell, it's supposed to
18:06:17fordcarsBut it gets {servers: blabablbalba}, not dataReceived({servers: blabablbalba});
18:16:44fordcarsraptor: I tried it out in another app and it looks like it's bitfighter.org doesn't support JSONP
18:22:30fordcarsraptor: I made it work with the use of a proxy that converts JSON to JSONP
18:22:45fordcarsIt'll do for now ;)
18:24:56raptorit's not bitfighter.org
18:25:08raptorit's a client problem because of browser access rules
18:26:59raptoroh i see.. maybe it's a data problem - the json needs the function padding
18:28:59raptoractually - jquery may still be able to do it
18:30:35fordcarsI tried it, it still gets the json itself "/
18:30:43raptorhttps://stackoverflow.com/questions/2681466/jsonp-with-jquery
18:36:13raptori'll shut up now - i haven't tried it yet myself...
18:43:55fordcarsHaha it's good :P
18:44:15fordcarsI'm supprised it's not my fault for once :P
18:44:41fordcars(I think)
18:44:57fordcarsAnyway this proxy works great, so we are good
21:34:35Watusimoto_ has joined
21:54:32Watusimoto_ Quit (Ping timeout: 256 seconds)
22:40:42raptor Quit ()
22:43:32Invisible has joined
22:58:44Watusimoto_ has joined

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.