You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This link does not open properly on kiwix-serve. Same behavior observed on Apple and PWA, so this really looks like an issue with wombat intercepting the click event and doing nasty things.
The text was updated successfully, but these errors were encountered:
<script type="text/javascript">
var links = document.querySelectorAll('a');
links.forEach((link) => {
var a = new RegExp('/' + window.location.host + '/');
if(!a.test(link.href)) {
link.addEventListener('click', (event) => {
event.preventDefault();
event.stopPropagation();
window.open(link.href, '_blank');
});
}
});
</script>
So all links are handled through javascript ... and hence dynamically rewritten even if we decided not to during static rewriting ...
Not sure how we can handle this, after all, we've said that all calls made from javascript must be rewritten for proper operation ...
Should we add a tweak in the static rewriting that can then be seen and used in dynamic rewriting so that we know we've already rewritten the link for sure and we've made the decision to not rewrite it?
Should we add yet another configuration switch to warc2zim to be able to configure when we do not want to inject wombat into a script like this (but it is hard to specify which script we want to ignore since it has no ID?)
See e.g. https://library.kiwix.org/content/noted.lol_en_all_2024-10/noted.lol/convert-any-website-into-a-zim-file-zimit/
At the bottom of the article, we have a link to Zimit GitHub repository
This link does not open properly on kiwix-serve. Same behavior observed on Apple and PWA, so this really looks like an issue with wombat intercepting the click event and doing nasty things.
The text was updated successfully, but these errors were encountered: