XMLHttpRequest Screen Size
|
|
Alright, so I have (what I believe is) an odd problem. I'm doing a XMLHttpRequest to google's image search page for my script, and I would like the change what google thinks is the screen resolution. I have no idea what it thinks it is now, but the number of images returned is based on screen size, so I would like to change it so that I have more control on how many images are displayed. Does anyone know is there a way to pass a screen size (maybe via headers) through an XMLHttpRequest? |
|
|
Isn't there a parameter for how many results you want to get?
|
|
|
Isn't there a parameter for how many results you want to get? Yes, it's called &num=100 but it doesn't work on image searches, just on web searches.
Ktashes, you're looking for innerWidth & innerHeight |
|
|
Thanks for the responses, @dob: You can try it yourself. Go to google and do an image search, then resize your browser window and it vary between 18, 20, and 21 depending on what is most convenient for your screen size. @JoeSimmons: Your right about the num thing, but like you said it doesn't work for images. And I know about innerWidth & innerHeight, I'm just unsure on how to pass that through and GM_XMLHttpRequest. I know it doesn't use the current screen size, as it produces 20 images for me, when an actual image search prompts 21 (1680x1050 resolution at fullscreen). However, it seems to change the number of images returned on a simple reload of the page... similar conundrum to one I had with my configuration script (which I believe I fixed). Based on your responses, I'm going to assume that no, there is no way to pass a specific screen size through. Thank you for your help, I'm just gonna have to reconfigure it to get the number of images on the fly. Thank you, KTaShes |
