I'm trying to change to source of the images shown in a page.
I've got this code:
function replaceSRC(){
var allImg=document.getElementsByTagName('img'), i=0, img;
while(img=allImg[i++]){
img.src=img.src.replace(\'//dyncdn.me/static/over/, "\'//dyncdn.me/static/poster/3/");
}
}
Not sure what to do next, im not really a script person i just wanted to make a site that uses to many small preview images to be seen bigger thats all.
the original source is:
dyncdn.me/static/over/random numbers.jpg
the source i want to use is:
dyncdn.me/static/poster/3/same random numbers.jpg
anyone can help out? thanks!
edit #1: seems the site is using onmouseover string to get the image source, while mouseout nothing shows. (only when my mouse is over the title the image is shown).
Your string syntax is wrong. The replace line should be: