Cleanup experimental notice

With bootstrap js always included there is no need to add own js to dismiss it.
Only generate the notice for experimental pages, no need to have js for that.
This commit is contained in:
Maximilian Krög
2020-07-25 14:28:37 +02:00
parent 4f76334c92
commit 8b733c2eba
2 changed files with 5 additions and 15 deletions

View File

@@ -291,15 +291,11 @@ class ExampleBuilder {
jsSource = jsSource.replace('new Worker()', "new Worker('./worker.js')");
data.js = {
tag: `<script src="${this.common}.js"></script><script src="${jsName}"></script>`,
tag: `<script src="${this.common}.js"></script>
<script src="${jsName}"></script>`,
source: jsSource,
};
if (data.experimental) {
const prelude = '<script>window.experimental = true;</script>';
data.js.tag = prelude + data.js.tag;
}
// check for worker js
const workerName = `${name}.worker.js`;
const workerPath = path.join(data.dir, workerName);