Posts that hosts is monitoring

Subscribe to Posts that hosts is monitoring 10 posts found

Mar 10, 2008
Mikado 575 posts

Topic: Is there any way to get binary data from a website?

Why would you need to load images in such weird way?

 
Mar 10, 2008
Descriptor 758 posts

Topic: Is there any way to get binary data from a website?

xmlHttpRequest mutilates the data, but if you do a search on the web you might be able to find a solution that repairs that.

 
Sep 18, 2007
Kendlar 11 posts

Topic: Simple script to replace a link

Thanks Yansky
It's real close but it adds the number again at the end.

Instead of being http://www.vcdquality.com/sample/id73638.jpg
It's ---------------- http://www.vcdquality.com/sample/id73638.jpg73638

 
Sep 18, 2007
Yansky 63 posts

Topic: Simple script to replace a link

Use sizzlemctwizzle's version, but put it in your original replace function.

var link;
link = document.body.getElementsByTagName("a")

for (var i = 0; i < link.length; i++) {
    link[i].href = link[i].href.replace("index.php?page=sample&id=", "/sample/id"+link[i].href.split('id=')[1]+".jpg");
}

Note: you may have to escape some characters in the replace.

 
Sep 18, 2007
Kendlar 11 posts

Topic: Simple script to replace a link

ima noob :)

Can't get it to work. I've tried all kinds of this but nothing. Here's the old and new...

// ==UserScript==
// @name           Bypass BritePic
// @namespace      dhdhd
// @description    dhhd
// @include        http://www.vcdquality.com/
// ==/UserScript==


/* OLD ONE - worked but affected EVERY LINK on page!
var link;
link = document.body.getElementsByTagName("a")

for (var i = 0; i < link.length; i++) {
    link[i].href = link[i].href = '/sample/id'+link[i].href.split('id=')[1]+'.jpg';
}
*/



// YOURS combined with old one so 12345(some random number) is used 

// don't see any effect
var oLinks = document.evaluate("//a[@href='index.php?page=sample&id=']");
	for(var i=0;i<olinks>
	oLinks[i].href="/sample/id'+link[i].href.split('id=')[1]+'.jpg';
}
</olinks>

 
Sep 14, 2007
Motty Katan 2 posts

Topic: Simple script to replace a link


var oLinks = document.evaluate("//a[@href='index.php?page=sample&id=12345']");
for(var i=0;i<olinks>
oLinks[i].href="/sample/id12345.jpg";
}

Didn't check it, but should work.

 
Sep 12, 2007
Kendlar 11 posts

Topic: Simple script to replace a link

I just noticed it's changing all the links. Is there a way to only affect links that have page=sample?

Thanks

 
Sep 10, 2007
Kendlar 11 posts

Topic: Simple script to replace a link

Thanks!

 
Sep 10, 2007
sizzlemctwizzle 120 posts

Topic: Simple script to replace a link

link[i].href = '/sample/id'+link[i].href.split('id=')[1]+'.jpg';

 
Sep 9, 2007
Kendlar 11 posts

Topic: Simple script to replace a link

I need to replace...
index.php?page=sample&id=12345

with...
/sample/id12345.jpg

I've tried messing with an existing script but can't figure out how to add the .jpg at the end.

var link;
link = document.body.getElementsByTagName("a")

for (var i = 0; i < link.length; i++) {
    link[i].href = link[i].href.replace("index.php?page=sample&id=","sample/id")
}