@opentabs-dev/opentabs-plugin-reddit 0.0.74 → 0.0.75
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_61ed199f-d359-432d-84cc-4e428b658679.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 ot2 = globalThis.__openTabs;
|
|
14967
14967
|
const newAdaptersObj = {};
|
|
14968
|
-
if (
|
|
14969
|
-
for (const key of Object.keys(
|
|
14970
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14968
|
+
if (ot2.adapters) {
|
|
14969
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
14970
|
+
const d = Object.getOwnPropertyDescriptor(ot2.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({}, ot2, { adapters: newAdaptersObj });
|
|
14975
14975
|
}
|
|
14976
14976
|
}
|
|
14977
14977
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15009,16 +15009,6 @@ 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
|
-
};
|
|
15022
15012
|
var existing = adapters["reddit"];
|
|
15023
15013
|
if (existing) {
|
|
15024
15014
|
if (typeof existing.teardown === "function") {
|
|
@@ -15030,7 +15020,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15030
15020
|
}
|
|
15031
15021
|
}
|
|
15032
15022
|
if (!Reflect.deleteProperty(adapters, "reddit")) {
|
|
15033
|
-
const
|
|
15023
|
+
const ot2 = globalThis.__openTabs;
|
|
15034
15024
|
const newAdapters = {};
|
|
15035
15025
|
for (const key of Object.keys(adapters)) {
|
|
15036
15026
|
if (key !== "reddit") {
|
|
@@ -15038,7 +15028,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15038
15028
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15039
15029
|
}
|
|
15040
15030
|
}
|
|
15041
|
-
globalThis.__openTabs = Object.assign({},
|
|
15031
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
15042
15032
|
}
|
|
15043
15033
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15044
15034
|
for (const tool of src_default.tools) {
|
|
@@ -15099,12 +15089,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15099
15089
|
}
|
|
15100
15090
|
}
|
|
15101
15091
|
};
|
|
15102
|
-
const
|
|
15103
|
-
if (!
|
|
15092
|
+
const ot2 = globalThis.__openTabs;
|
|
15093
|
+
if (!ot2._navigationInterceptor) {
|
|
15104
15094
|
const origPushState = history.pushState.bind(history);
|
|
15105
15095
|
const origReplaceState = history.replaceState.bind(history);
|
|
15106
15096
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15107
|
-
|
|
15097
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15108
15098
|
history.pushState = function(...args) {
|
|
15109
15099
|
origPushState(...args);
|
|
15110
15100
|
for (const cb of callbacks.values()) {
|
|
@@ -15118,7 +15108,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15118
15108
|
}
|
|
15119
15109
|
};
|
|
15120
15110
|
}
|
|
15121
|
-
const interceptor =
|
|
15111
|
+
const interceptor = ot2._navigationInterceptor;
|
|
15122
15112
|
interceptor.callbacks.set("reddit", checkUrl);
|
|
15123
15113
|
window.addEventListener("popstate", checkUrl);
|
|
15124
15114
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15173,5 +15163,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15173
15163
|
};
|
|
15174
15164
|
delete src_default.onDeactivate;
|
|
15175
15165
|
}
|
|
15176
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="
|
|
15166
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="e45988638873098f88ffc9511d903f137a297790e0b17f295ba5414e89545719";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});}})();
|
|
15177
15167
|
//# sourceMappingURL=adapter.iife.js.map
|