你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/1628-gaia-image-patch/discussions/11911,源站連結 點此以跳轉。
Lets Images load directly without using gaia's image cache server (The cache server exist to prevent password protected images from prompting for password)
I'll also add that mine executes much faster. Lol
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
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.
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,'');
}
}
})();