Skip to content

Commit

Permalink
relative url added to table image src
Browse files Browse the repository at this point in the history
  • Loading branch information
npy11 authored and npy11 committed Oct 1, 2024
1 parent e0f09d3 commit e18aca5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blocks/code/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ export default async function decorate(block) {
if (iframe.length != 0) {
block.parentElement.classList.add('iframe-width');
}
// adding relative url to table image src
block.querySelectorAll('img').forEach((img)=>{
let url = new URL(img.src);
img.src = url.pathname;
});
mobileHeaderAnalytics(block);
}

0 comments on commit e18aca5

Please sign in to comment.