SirMelton
#102102861Friday, June 21, 2013 4:17 PM GMT

I revised your page.js file. pastebin/TAUBJqc8 You've probably already expanded upon it, though. "Do not allow yourself to be blinded by fear or anger. Everything is only as it is."
1waffle1
#102117357Friday, June 21, 2013 6:22 PM GMT

I took url out of the o array because ID and title is already there.
1waffle1
#102268094Saturday, June 22, 2013 1:18 PM GMT

I left the idea of using a plugin and did it more efficiently without loading every page unnecessarily. Now I'm $.get()ting the source of every game page, parsing it and sorting it. It works very quickly (though maybe not as quickly as possible.)     var up=parseInt(code.replace(/,/g,'').match(/Thumbs up: [0-9]+/)[0].match(/[0-9]+/)[0]);     var down=parseInt(code.replace(/,/g,'').match(/Thumbs down: [0-9]+/)[0].match(/[0-9]+/)[0]);     var title=code.match(/item-header".\s*.h2 class="notranslate"..*.\/h2./)[0];     title=title.match(/notranslate"..*.\/h2./)[0].slice(13,-5);     var id=parseInt(code.match(/asset-id="[0-9]+/)[0].match(/[0-9]+/)[0]);     var creator=code.match(/"tooltip" original-title=".+"./)[0].match(/=".+"/)[0].slice(2,-1);     var visits=parseInt(code.replace(/,/g,'').match(/Visited: [\s\S]+.span class="stat".[0-9]+/)[0].match(/[0-9]+/)[0]) bracket matches replaced with .s
BlueTaslem
#102268658Saturday, June 22, 2013 1:24 PM GMT

That's good except that you can't then take advantage of pages that the user loads.
1waffle1
#102270963Saturday, June 22, 2013 1:46 PM GMT

I wouldn't need to because it has probably already seen it.
1waffle1
#102363139Sunday, June 23, 2013 1:15 AM GMT

I left it running for a few minutes and now I've checked 600 pages of games and sorted them all. If I could run it on a server or something then that would be great; I've never done anything like that before. I'm sure that after page 1000 everything is worthless so I'll make it recycle after that point (which could possibly take under half an hour to get to.)
1waffle1
#102449597Sunday, June 23, 2013 5:17 PM GMT

I'm having a hard time with the cross-domain policy. I'm able to do it in the chrome console so why is it a security issue from anywhere else? I tried using an iframe and it doesn't like that either.
BlueTaslem
#102454340Sunday, June 23, 2013 5:55 PM GMT

Apparently that's how it works. You can set in the manifest what page to act like the extension is running from, but I'm pretty sure that kills the chrome.* api. I really don't know. XMLHttpRequests work fine for pages, but apparently the Games page doesn't give the list of games in source for pages > 1..
SirMelton
#102457101Sunday, June 23, 2013 6:14 PM GMT

> 'I'm having a hard time with the cross-domain policy...' Well, you shouldn't have a problem with the same-origin policy if you're using a Chrome extension, and have set the permissions allowing your extension to send these requests. > 'You can set in the manifest what page to act like the extension is running from, but I'm pretty sure that kills the chrome.* api.' I'm a little confused. Are you referring to content scripts? That shouldn't "kill" the Chrome.* API. Can someone give me the latest version of the extension?
1waffle1
#102457470Sunday, June 23, 2013 6:17 PM GMT

I just said I want to run my code on a server. No I am not using a chrome extension and there is no manifest.
RenderSettings
#102457959Sunday, June 23, 2013 6:20 PM GMT

You could eval() the code from a JSON/webrequest instead of using a tag to bypass the same-origin policy, but that's pretty bad practice since if your website is compromised, they can execute scripts on anyone with the extension...
1waffle1
#102458208Sunday, June 23, 2013 6:22 PM GMT

I need a way to parse the source of a page without being yelled at because the browser isn't doing it in the console on that domain.
SirMelton
#102458439Sunday, June 23, 2013 6:23 PM GMT

> 'I just said I want to run my code on a server. No I am not using a chrome extension and there is no manifest.' I apologize for not reading all of your replies on this thread.
BlueTaslem
#102459484Sunday, June 23, 2013 6:31 PM GMT

Chrome extensions don't have permissions to use iframe's in background pages cross domain, I'm not sure why. You won't be able to use JS to violate cross origin on a regular page. That's just not safe.
Prehistoricman
#102460029Sunday, June 23, 2013 6:35 PM GMT

'I need a way to parse the source of a page without being yelled at because the browser isn't doing it in the console on that domain.' Welcome to Chrome.
1waffle1
#102460560Sunday, June 23, 2013 6:39 PM GMT

JS can be executed from the chrome console when it's on the same domain. It can't do anything if it's not on the same domain. It's very easy to GO to the domain and then run the code, so why bother restricting it?
1waffle1
#102460971Sunday, June 23, 2013 6:42 PM GMT

I want to do what the chrome console is able to do in the same domain, but not from the chrome console, and not from the same domain.
BlueTaslem
#102461404Sunday, June 23, 2013 6:45 PM GMT

It is not easy to go to the domain and execute it, when you're talking about the scripts on a page. That's impossible.
1waffle1
#102461684Sunday, June 23, 2013 6:47 PM GMT

It is easy to do it manually. Why can it only be done manually?
1waffle1
#102461914Sunday, June 23, 2013 6:48 PM GMT

All I need to do is parse the source of a cross-domain page. Is this possible?
1waffle1
#102474000Sunday, June 23, 2013 8:20 PM GMT

y u no answer
Tenul
#102474760Sunday, June 23, 2013 8:26 PM GMT

> 'All I need to do is parse the source of a cross-domain page. Is this possible?' Yes, of course it is.
1waffle1
#102476553Sunday, June 23, 2013 8:38 PM GMT

what a helpful and constructive answer!
BlueTaslem
#102480104Sunday, June 23, 2013 9:02 PM GMT

No, it's not. The only cross domain requests that can be done are the loading of script files. Unless the site offers 1) generated, standalone scripts that you can steal data from or 2) JSONP or similar, you won't be able to (or at least, you're not supposed to be able to) using pure JS..
1waffle1
#102480724Sunday, June 23, 2013 9:06 PM GMT

I'm trying to parse the game pages. I don't really need the entire source because the same text is displayed plainly, but I don't know how to access it from another domain. What about Uuvinu and all of his bots? How could he be scanning the website from a different domain?