@opentabs-dev/opentabs-plugin-reddit 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
CHANGED
|
@@ -14957,21 +14957,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14957
14957
|
};
|
|
14958
14958
|
var src_default = new RedditPlugin();
|
|
14959
14959
|
|
|
14960
|
-
// dist/
|
|
14960
|
+
// dist/_adapter_entry_12b71574-e200-4403-8d14-7bb63132c2fd.ts
|
|
14961
14961
|
if (!globalThis.__openTabs) {
|
|
14962
14962
|
globalThis.__openTabs = {};
|
|
14963
14963
|
} else {
|
|
14964
14964
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
14965
14965
|
if (desc && !desc.writable) {
|
|
14966
|
-
const
|
|
14966
|
+
const ot3 = globalThis.__openTabs;
|
|
14967
14967
|
const newAdaptersObj = {};
|
|
14968
|
-
if (
|
|
14969
|
-
for (const key of Object.keys(
|
|
14970
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14968
|
+
if (ot3.adapters) {
|
|
14969
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
14970
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
14971
14971
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14972
14972
|
}
|
|
14973
14973
|
}
|
|
14974
|
-
globalThis.__openTabs = Object.assign({},
|
|
14974
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
14975
14975
|
}
|
|
14976
14976
|
}
|
|
14977
14977
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15009,6 +15009,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15009
15009
|
}
|
|
15010
15010
|
};
|
|
15011
15011
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15012
|
+
var ot2 = globalThis.__openTabs;
|
|
15013
|
+
ot2._notifyReadinessChanged = () => {
|
|
15014
|
+
try {
|
|
15015
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15016
|
+
if (nonce) {
|
|
15017
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "reddit", nonce }, "*");
|
|
15018
|
+
}
|
|
15019
|
+
} catch {
|
|
15020
|
+
}
|
|
15021
|
+
};
|
|
15012
15022
|
var existing = adapters["reddit"];
|
|
15013
15023
|
if (existing) {
|
|
15014
15024
|
if (typeof existing.teardown === "function") {
|
|
@@ -15020,7 +15030,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15020
15030
|
}
|
|
15021
15031
|
}
|
|
15022
15032
|
if (!Reflect.deleteProperty(adapters, "reddit")) {
|
|
15023
|
-
const
|
|
15033
|
+
const ot3 = globalThis.__openTabs;
|
|
15024
15034
|
const newAdapters = {};
|
|
15025
15035
|
for (const key of Object.keys(adapters)) {
|
|
15026
15036
|
if (key !== "reddit") {
|
|
@@ -15028,7 +15038,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15028
15038
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15029
15039
|
}
|
|
15030
15040
|
}
|
|
15031
|
-
globalThis.__openTabs = Object.assign({},
|
|
15041
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15032
15042
|
}
|
|
15033
15043
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15034
15044
|
for (const tool of src_default.tools) {
|
|
@@ -15089,12 +15099,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15089
15099
|
}
|
|
15090
15100
|
}
|
|
15091
15101
|
};
|
|
15092
|
-
const
|
|
15093
|
-
if (!
|
|
15102
|
+
const ot3 = globalThis.__openTabs;
|
|
15103
|
+
if (!ot3._navigationInterceptor) {
|
|
15094
15104
|
const origPushState = history.pushState.bind(history);
|
|
15095
15105
|
const origReplaceState = history.replaceState.bind(history);
|
|
15096
15106
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15097
|
-
|
|
15107
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15098
15108
|
history.pushState = function(...args) {
|
|
15099
15109
|
origPushState(...args);
|
|
15100
15110
|
for (const cb of callbacks.values()) {
|
|
@@ -15108,7 +15118,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15108
15118
|
}
|
|
15109
15119
|
};
|
|
15110
15120
|
}
|
|
15111
|
-
const interceptor =
|
|
15121
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15112
15122
|
interceptor.callbacks.set("reddit", checkUrl);
|
|
15113
15123
|
window.addEventListener("popstate", checkUrl);
|
|
15114
15124
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15163,5 +15173,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15163
15173
|
};
|
|
15164
15174
|
delete src_default.onDeactivate;
|
|
15165
15175
|
}
|
|
15166
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="
|
|
15176
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="b2ed9c82c456ebc9aa2d141756f608e0d830c57bbdbcffe8c0e4710f5b28f890";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,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15167
15177
|
//# sourceMappingURL=adapter.iife.js.map
|