@opentabs-dev/opentabs-plugin-netflix 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter.iife.js +23 -13
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -15108,21 +15108,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15108
15108
|
};
|
|
15109
15109
|
var src_default = new NetflixPlugin();
|
|
15110
15110
|
|
|
15111
|
-
// dist/
|
|
15111
|
+
// dist/_adapter_entry_5e4fd15b-5a10-4e09-b9a2-a3c14da89915.ts
|
|
15112
15112
|
if (!globalThis.__openTabs) {
|
|
15113
15113
|
globalThis.__openTabs = {};
|
|
15114
15114
|
} else {
|
|
15115
15115
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15116
15116
|
if (desc && !desc.writable) {
|
|
15117
|
-
const
|
|
15117
|
+
const ot3 = globalThis.__openTabs;
|
|
15118
15118
|
const newAdaptersObj = {};
|
|
15119
|
-
if (
|
|
15120
|
-
for (const key of Object.keys(
|
|
15121
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15119
|
+
if (ot3.adapters) {
|
|
15120
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
15121
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
15122
15122
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15123
15123
|
}
|
|
15124
15124
|
}
|
|
15125
|
-
globalThis.__openTabs = Object.assign({},
|
|
15125
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
15126
15126
|
}
|
|
15127
15127
|
}
|
|
15128
15128
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15160,6 +15160,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15160
15160
|
}
|
|
15161
15161
|
};
|
|
15162
15162
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15163
|
+
var ot2 = globalThis.__openTabs;
|
|
15164
|
+
ot2._notifyReadinessChanged = () => {
|
|
15165
|
+
try {
|
|
15166
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15167
|
+
if (nonce) {
|
|
15168
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "netflix", nonce }, "*");
|
|
15169
|
+
}
|
|
15170
|
+
} catch {
|
|
15171
|
+
}
|
|
15172
|
+
};
|
|
15163
15173
|
var existing = adapters["netflix"];
|
|
15164
15174
|
if (existing) {
|
|
15165
15175
|
if (typeof existing.teardown === "function") {
|
|
@@ -15171,7 +15181,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15171
15181
|
}
|
|
15172
15182
|
}
|
|
15173
15183
|
if (!Reflect.deleteProperty(adapters, "netflix")) {
|
|
15174
|
-
const
|
|
15184
|
+
const ot3 = globalThis.__openTabs;
|
|
15175
15185
|
const newAdapters = {};
|
|
15176
15186
|
for (const key of Object.keys(adapters)) {
|
|
15177
15187
|
if (key !== "netflix") {
|
|
@@ -15179,7 +15189,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15179
15189
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15180
15190
|
}
|
|
15181
15191
|
}
|
|
15182
|
-
globalThis.__openTabs = Object.assign({},
|
|
15192
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15183
15193
|
}
|
|
15184
15194
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15185
15195
|
for (const tool of src_default.tools) {
|
|
@@ -15240,12 +15250,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15240
15250
|
}
|
|
15241
15251
|
}
|
|
15242
15252
|
};
|
|
15243
|
-
const
|
|
15244
|
-
if (!
|
|
15253
|
+
const ot3 = globalThis.__openTabs;
|
|
15254
|
+
if (!ot3._navigationInterceptor) {
|
|
15245
15255
|
const origPushState = history.pushState.bind(history);
|
|
15246
15256
|
const origReplaceState = history.replaceState.bind(history);
|
|
15247
15257
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15248
|
-
|
|
15258
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15249
15259
|
history.pushState = function(...args) {
|
|
15250
15260
|
origPushState(...args);
|
|
15251
15261
|
for (const cb of callbacks.values()) {
|
|
@@ -15259,7 +15269,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15259
15269
|
}
|
|
15260
15270
|
};
|
|
15261
15271
|
}
|
|
15262
|
-
const interceptor =
|
|
15272
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15263
15273
|
interceptor.callbacks.set("netflix", checkUrl);
|
|
15264
15274
|
window.addEventListener("popstate", checkUrl);
|
|
15265
15275
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15314,5 +15324,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15314
15324
|
};
|
|
15315
15325
|
delete src_default.onDeactivate;
|
|
15316
15326
|
}
|
|
15317
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["netflix"]){var a=o.adapters["netflix"];a.__adapterHash="
|
|
15327
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["netflix"]){var a=o.adapters["netflix"];a.__adapterHash="cfcae97783804c1cbb8966b837a50a69b7734666a0761aa1c540a7c5fc544d56";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"netflix",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15318
15328
|
//# sourceMappingURL=adapter.iife.js.map
|