mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
replaces the old relative paths inside the content html with absolute paths that use the new app_root path
This commit is contained in:
@@ -99,6 +99,13 @@ export default {
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
);
|
||||
});
|
||||
document.querySelectorAll("[href]").forEach((el) => {
|
||||
let original_href = el.getAttribute("href");
|
||||
// replaces the old relative paths with the new app_root path
|
||||
if (original_href.match(/^\.\.\/index\.ci\.php/)){
|
||||
el.href = original_href.replace(/^\.\.\/index\.ci\.php\//,FHC_JS_DATA_STORAGE_OBJECT.app_root);
|
||||
}
|
||||
});
|
||||
},
|
||||
template: /*html*/ `
|
||||
<!-- div that contains the content -->
|
||||
|
||||
Reference in New Issue
Block a user