Convert src to use Feedbin proxy images when they are available. Issue #1632
This commit is contained in:
parent
046162b303
commit
38ef0c2515
@ -22,10 +22,14 @@ function stripStyles() {
|
|||||||
document.getElementsByTagName("body")[0].querySelectorAll("[style]").forEach(element => stripStylesFromElement(element, ["color", "background", "font"]));
|
document.getElementsByTagName("body")[0].querySelectorAll("[style]").forEach(element => stripStylesFromElement(element, ["color", "background", "font"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert all image locations to be absolute
|
// Convert all Feedbin proxy images to be used as src, otherwise change image locations to be absolute
|
||||||
function convertImgSrc() {
|
function convertImgSrc() {
|
||||||
document.querySelectorAll("img").forEach(element => {
|
document.querySelectorAll("img").forEach(element => {
|
||||||
|
if (element.hasAttribute("data-camo-src")) {
|
||||||
|
element.src = element.getAttribute("data-camo-src")
|
||||||
|
} else {
|
||||||
element.src = new URL(element.src, document.baseURI).href;
|
element.src = new URL(element.src, document.baseURI).href;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user