Recent posts by FurYy

Subscribe to Recent posts by FurYy 2 posts found

Aug 14, 2007
FurYy 2 posts

Topic: Ideas and script requests / Request: Background image to img

I'm yet to discover a nicer way to get the url from style.background :P
[Note to self : there's Edit post too , doh]

 
Aug 14, 2007
FurYy 2 posts

Topic: Ideas and script requests / Request: Background image to img

One possible way:

(function(){

	var divs=document.getElementsByTagName('div');

	for(var i=0;i<divs>-1){
				url=url.substr(url.indexOf("url")+4);
				url=url.substr(0,url.indexOf(")"));
				GM_log(url);
				GM_log(divs[i].getElementsByTagName('img')[0].src);
				divs[i].getElementsByTagName('img')[0].src=url;
			}
		}
	}
})();

divs[i].getElementsByTagName('img') should get imgs only from that DIV, though i have not used it that way :P