graflow: fixing path

This commit is contained in:
STEINNI
2026-03-10 21:14:53 +00:00
parent 8cd1a65189
commit dadb236bc3

View File

@@ -10,6 +10,7 @@
* This code is free to use and modify, * This code is free to use and modify,
* as long as the copyright notice and license are kept. * as long as the copyright notice and license are kept.
*/ */
const scriptUrl = document.currentScript.src
class BZgraflow extends Buildoz{ class BZgraflow extends Buildoz{
dirVect = { dirVect = {
@@ -39,7 +40,8 @@ class BZgraflow extends Buildoz{
static async getCoreCss(){ static async getCoreCss(){
if(BZgraflow._coreCssPromise) return(await BZgraflow._coreCssPromise) if(BZgraflow._coreCssPromise) return(await BZgraflow._coreCssPromise)
BZgraflow._coreCssPromise = (async() => { BZgraflow._coreCssPromise = (async() => {
const res = await fetch('./buildoz.css') const url = new URL('./buildoz.css', scriptUrl)
const res = await fetch(url)
const css = await res.text() const css = await res.text()
const m = css.match(/\/\*\s*BZGRAFLOW_CORE_START\s*\*\/([\s\S]*?)\/\*\s*BZGRAFLOW_CORE_END\s*\*\//) const m = css.match(/\/\*\s*BZGRAFLOW_CORE_START\s*\*\/([\s\S]*?)\/\*\s*BZGRAFLOW_CORE_END\s*\*\//)
const core = m ? m[1] : '' const core = m ? m[1] : ''