mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-12 13:58:28 -04:00
Cleanup console debug
Former-commit-id: 6a06cd900d2450bff7bedcca8786a4d81fbfbca2 [formerly 3ddf5903bd537429837d817245a08e852fab04c3 [formerly 7104f4da7523623f8b2b6e15830798c28775cbf8]] Former-commit-id: c3b1e4d295148271e3659c9195657abe2dd97afa [formerly 1073e5a1a4acfc707c0838cf2d5c32734dee64f1] Former-commit-id: 973e2751963226029c77d931a07b39ed6b767d36
This commit is contained in:
parent
26fbf256c4
commit
5b9a55bde6
@ -142,7 +142,7 @@ define([], function () {
|
||||
// Deal with <meta http-equiv refresh...> directives
|
||||
// if (/<meta\s+http-equiv[^>]+refresh\b/i.test(newBlock)) dirEntry.zimitRedirect = assetUrl.replace(/^\//, '');
|
||||
newBlock = newBlock.replace(relAssetUrl, '@kiwixtransformed@' + assetUrl);
|
||||
console.debug('Transform: \n' + match + '\n -> ' + newBlock);
|
||||
// console.debug('Transform: \n' + match + '\n -> ' + newBlock);
|
||||
return newBlock;
|
||||
});
|
||||
|
||||
@ -179,10 +179,12 @@ define([], function () {
|
||||
|
||||
// ZIM-specific overrides
|
||||
if (/(?:journals\.openedition\.org)/i.test(params.zimitPrefix)) {
|
||||
// DEV: Checked still necessary as of 8-6-2022
|
||||
// Neutralize all inline scripts, excluding math blocks or react templates, as they cause a loop on loading article
|
||||
data = data.replace(regexpInlineScriptsNotMaths, function (p0, p1) {
|
||||
return '<!-- ' + p1 + ' --!>';
|
||||
});
|
||||
// data = data.replace(/<script\b[^>]+tarteaucitron[^"']*?\.js(?:[^<]|<(?!\/script>))+<\/script>\s*/i, '');
|
||||
}
|
||||
|
||||
// Collapse open menu bar
|
||||
@ -215,7 +217,7 @@ define([], function () {
|
||||
// Relative assets
|
||||
newBlock = assetUrl === url ? newBlock :
|
||||
newBlock.replace(url, '@kiwixtransformed@' + '/' + selectedArchive._file.name + '/' + assetUrl);
|
||||
console.debug('Transform: \n' + match + '\n -> ' + newBlock);
|
||||
// console.debug('Transform: \n' + match + '\n -> ' + newBlock);
|
||||
return newBlock;
|
||||
});
|
||||
} // End of css transformations
|
||||
|
Loading…
x
Reference in New Issue
Block a user