Craete a JavaScript file

Create a plain JavaScript file and write any code you need; it will run; it will run for each page after reload and page navigation or calling cleanup(); function call.

/fragments/js/every/test.js

console.log("copilot")copy

📜 Note

Fragmenium in not compatible with static import

Configuring JS Every Fragment

In ref and a js object; inside it create a every array whose items are the absolute paths of the JavaScript every fragments to execute every pages.

/reference.js

export const ref = {
  js:{
    every:["/fragments/js/every/test.js"]
  }
}copy
JS Constant JS Specific