2019-10-13 02:01:01 +00:00
|
|
|
import { PublicAPI } from "../../js-src/public-api";
|
|
|
|
import { SourceAPI } from "../../js-src/source-api";
|
2019-10-06 16:29:15 +00:00
|
|
|
import { get_config_options } from "../../js-src/config";
|
2019-08-22 04:06:30 +00:00
|
|
|
|
2019-09-05 19:05:22 +00:00
|
|
|
let html = document.getElementsByTagName("html")[0];
|
|
|
|
let page_options = get_config_options(html);
|
|
|
|
|
|
|
|
if (!page_options.optout) {
|
2019-10-13 02:01:01 +00:00
|
|
|
window.RufflePlayer = PublicAPI.negotiate(window.RufflePlayer, "extension", new SourceAPI());
|
2019-09-05 19:05:22 +00:00
|
|
|
} else {
|
|
|
|
console.log("WebExtension Ruffle execution prohibited by page");
|
|
|
|
}
|