Gaia Image Patch

Lets Images load directly without using gaia's image cache server (The cache server exist to prevent password protected images from prompting for password)

< Feedback on Gaia Image Patch

Question/comment

§
Posted: 28.05.2014

I already made a script for this. Lol

Made this sometime last year or a little later. Lol
(function() {
var image = document.getElementsByTagName('img');
var regex = /(http:\/\/img-cache.cdn.gaiaonline.com\/[a-z0-9]+\/)/;
var img, res;

for(idx in image) {
img = image[idx];
res = regex.test(img.src);
if(res) {
img.src = img.src.replace(regex,'');
}
}
})();

§
Posted: 28.05.2014

I'll also add that mine executes much faster. Lol

§
Posted: 12.06.2014

wait, since when is getElementsByTagName faster than xpath?
*goes to test this*
your script takes 56 milliseconds to finish while mine takes 24 milliseconds
so according my my test my script is over twice as fast
**test in firefox scratchpad

§
Posted: 22.08.2018

Oh, hey. Look, an old discussion. Let's add to it in case this ever proves useful to anyone.

You can't compare XPath vs the DOM API. XPath is only a language specification. You can compare the implementation of XPath to the DOM API. However, you'll get different results for the XPath implementation depending on the implementation, Chrome vs Firefox vs Edge vs Safari, etc. It depends on how the implementation has been optimized for the browser.

Post reply

Sign in to post a reply.