Timestamps are in GMT/BST.
| 00:04:44 | | Destroyerimo has joined |
| 00:07:48 | | Destroyerimo_clo Quit (Ping timeout: 256 seconds) |
| 00:08:29 | | Destroyerimo_clo has joined |
| 00:09:17 | | Destroyerimo Quit (Ping timeout: 260 seconds) |
| 00:17:13 | | Destroyerimo_clo Quit (Ping timeout: 260 seconds) |
| 00:56:08 | fordcars | Night! |
| 00:56:10 | | fordcars Quit (Quit: Page closed) |
| 00:58:52 | amgine123 | good night |
| 01:03:13 | | amgine123 Quit (Ping timeout: 246 seconds) |
| 01:22:07 | | Nothing_Much Quit (Ping timeout: 272 seconds) |
| 01:40:37 | | Nothing_Much has joined |
| 07:08:15 | | Darrel Quit (Read error: Connection reset by peer) |
| 07:12:01 | | Darrel has joined |
| 08:56:43 | | Raven67854 Quit (Ping timeout: 260 seconds) |
| 08:57:13 | | Raven67854 has joined |
| 10:43:59 | | Raven67854 Quit (Ping timeout: 245 seconds) |
| 10:57:45 | | Raven67854 has joined |
| 11:50:06 | | LordDVG has joined |
| 13:09:25 | | fordcars has joined |
| 13:10:29 | fordcars | watusimoto: 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:02 | fordcars | Sorry, "No 'Access-Control-Allow-Origin' header is present on the requested resource" |
| 13:12:08 | sam686 | you can see http://bitfighter.org/bitfighterStatus.json directly, right? |
| 13:12:17 | fordcars | Yes |
| 13:12:21 | fordcars | Wait, I think this is my fault |
| 13:12:28 | fordcars | Sorry! |
| 13:13:09 | sam686 | the problem might be that your html script tries to access a different website which some browsers block |
| 13:14:22 | fordcars | Yeah, it was doing that |
| 13:31:53 | fordcars | It looks like bitfighte.orgr doesn't allow Access-Control-Allow-Origin |
| 14:50:03 | | LordDVG Quit (Remote host closed the connection) |
| 15:47:40 | | Raven67854 Quit (Remote host closed the connection) |
| 17:04:50 | | raptor has joined |
| 17:04:50 | | ChanServ sets mode +o |
| 17:06:58 | raptor | fordcars: that access-origin-thingy is because of restictive controls that all web-sites have with pulling data from other sites |
| 17:07:18 | raptor | the 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:47 | fordcars | Thanks I'll check it out |
| 17:08:14 | raptor | if you use jquery, then i think there is a simple method to use jsonp with... |
| 17:38:50 | fordcars | raptor: I am sending this: http://bitfighter.org/bitfighterStatus.json?callback=dataReceived |
| 17:39:06 | raptor | are you using jquery? |
| 17:39:14 | fordcars | No, it's simple without it |
| 17:39:48 | fordcars | But I am not getting anything |
| 17:39:58 | raptor | you have to handle it special |
| 17:40:22 | fordcars | I am (I think); bitfighter.org should give me a method, but it's not |
| 17:40:42 | raptor | i don't actually remember how to do it with normal JS... I've been using jquery for years... |
| 17:40:46 | fordcars | I am setting the src of a <script> to that, and I should get a method |
| 17:41:00 | fordcars | script.src = c.statusUrl + "?callback=" + c.callback;console.log(script.src); |
| 17:41:08 | fordcars | Without the log haha |
| 17:42:07 | raptor | here is an example: https://stackoverflow.com/questions/6132796/how-to-make-a-jsonp-request-from-javascript-without-jquery |
| 17:42:45 | fordcars | Oh, you have to add it to the html? |
| 17:42:55 | fordcars | I'll try it out |
| 17:46:38 | fordcars | Oh sweet it works! |
| 18:00:24 | raptor | oh good |
| 18:02:35 | fordcars | Never mind :x |
| 18:02:44 | fordcars | I keep getting the json itself, not a method |
| 18:03:01 | raptor | that's what you want, right? |
| 18:03:41 | fordcars | Well, JSONP is supposed to callback a method, giving as an argument the json object |
| 18:03:48 | fordcars | This is what I am sending: http://bitfighter.org/bitfighterStatus.json?callback=dataReceived |
| 18:03:59 | fordcars | It's supposed to call dataReceived() |
| 18:04:39 | fordcars | But when it interprets the supposedly javascript, it fails because it's json |
| 18:05:23 | fordcars | It interprets http://bitfighter.org/bitfighterStatus.json?callback=dataReceived as if it was a .js file |
| 18:05:45 | fordcars | with dataReceived({servers: blabablbalba}); in it |
| 18:05:50 | fordcars | Well, it's supposed to |
| 18:06:17 | fordcars | But it gets {servers: blabablbalba}, not dataReceived({servers: blabablbalba}); |
| 18:16:44 | fordcars | raptor: I tried it out in another app and it looks like it's bitfighter.org doesn't support JSONP |
| 18:22:30 | fordcars | raptor: I made it work with the use of a proxy that converts JSON to JSONP |
| 18:22:45 | fordcars | It'll do for now ;) |
| 18:24:56 | raptor | it's not bitfighter.org |
| 18:25:08 | raptor | it's a client problem because of browser access rules |
| 18:26:59 | raptor | oh i see.. maybe it's a data problem - the json needs the function padding |
| 18:28:59 | raptor | actually - jquery may still be able to do it |
| 18:30:35 | fordcars | I tried it, it still gets the json itself "/ |
| 18:30:43 | raptor | https://stackoverflow.com/questions/2681466/jsonp-with-jquery |
| 18:36:13 | raptor | i'll shut up now - i haven't tried it yet myself... |
| 18:43:55 | fordcars | Haha it's good :P |
| 18:44:15 | fordcars | I'm supprised it's not my fault for once :P |
| 18:44:41 | fordcars | (I think) |
| 18:44:57 | fordcars | Anyway this proxy works great, so we are good |
| 21:34:35 | | Watusimoto_ has joined |
| 21:54:32 | | Watusimoto_ Quit (Ping timeout: 256 seconds) |
| 22:40:42 | | raptor Quit () |
| 22:43:32 | | Invisible has joined |
| 22:58:44 | | Watusimoto_ has joined |