Load custom libraries Pro only

Fake Data comes bundled with two great libraries that are used to generate the data throughout the extension. One is Fakeropen in new window and the other is Moment.jsopen in new window.

While these two might suffice the needs most of the time, there may be scenarios where you want other libraries to be loaded. Either because you want to extend Fake Data's functionality, or you just need a script to be executed automatically by the extension. Regardless of the reason, Fake Data allows you to load custom js files that are executed in the global scope.

When you upload your .js file to Fake Data, you need to be aware of the context in which is executed.

  • Background libraries are executed in the background page of the extension. These scripts will only run once, when the extension is loaded (for example, when the browser starts up, or when you reload the extension).
  • Foreground libraries are executed as content scripts. These files are executed separately for each webpage that you visit or reload.
  • Custom sandboxed libraries are executed in the sandbox iframe, as part of the MV3 restrictions. Similar to foreground libraries from MV2, these files are executed on each page load.