|
I'm trying to write a greasemonkey script to replace the tiny rear end thumbnails on gnome-look.org (seriously 80px by 50px? This is 1990, jesus christ). Only problem, is there is no consistency in the thumbnail to fullsize image extensions. A png thumb can be a jpg fullsize, a png fullsize or quite possibly a gif and any other combination like this. The solution here is to do an image check. Unfortunately, I'm a javascript idiot and I've gotten stuck on this problem while trying to solve it different ways. The one I _thought_ would be successful was most certainly not, that was using a global var to set and test true/false. Can someone please help me out and liberate me from this ancient website? code:
|
# ¿ Apr 18, 2009 12:52 |
|
|
# ¿ May 3, 2024 23:56 |
|
Well the actual check whether the image exists or not works, no XHR necessary there. The problem I'm having is looping it.
|
# ¿ Apr 18, 2009 18:18 |
|
Well, this looks like the better solution. I appreciate the rewrite and I will learn from it. It works great in Opera, however, my main browser, Firefox doesn't seem to make it to the following function in the second parameter at line 18:code:
|
# ¿ Apr 19, 2009 06:40 |
|
Still not working for me, receiving the following error in console: Firefox 3.0.8 on Linux code:
|
# ¿ Apr 19, 2009 16:00 |
|
Thanks NigglyPuff, you're my hero! I'm going to browse me some themes By the way, https://www.kde-look.org runs on the same outdated software if you'd like to get double points on userscripts.org or add them to the top of this one like I did. Thanks again
|
# ¿ Apr 20, 2009 18:04 |
|
Other Door posted:I need them not to repeat. Once image 3 has been displayed I want it to move on to the next random image and never show image 3 again. Is this possible? pop it off the array.
|
# ¿ Sep 7, 2009 18:58 |
|
|
# ¿ May 3, 2024 23:56 |
|
Other Door posted:how? I've tried the splice command with no success. randomize the order of your array, then use pop http://www.w3schools.com/jsref/jsref_pop.asp
|
# ¿ Sep 7, 2009 19:32 |