@opentabs-dev/opentabs-plugin-onenote 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 +20 -31
- 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
|
@@ -271,19 +271,18 @@
|
|
|
271
271
|
}
|
|
272
272
|
return null;
|
|
273
273
|
};
|
|
274
|
+
try {
|
|
275
|
+
return search(localStorage);
|
|
276
|
+
} catch {
|
|
277
|
+
}
|
|
274
278
|
let storage;
|
|
275
279
|
try {
|
|
276
|
-
storage =
|
|
280
|
+
storage = localStorage;
|
|
277
281
|
} catch {
|
|
278
282
|
return null;
|
|
279
283
|
}
|
|
280
|
-
if (storage)
|
|
281
|
-
|
|
282
|
-
return search(storage);
|
|
283
|
-
} catch {
|
|
284
|
-
return null;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
284
|
+
if (storage !== void 0)
|
|
285
|
+
return null;
|
|
287
286
|
try {
|
|
288
287
|
const iframe = document.createElement("iframe");
|
|
289
288
|
iframe.style.display = "none";
|
|
@@ -14658,21 +14657,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14658
14657
|
};
|
|
14659
14658
|
var src_default = new OneNotePlugin();
|
|
14660
14659
|
|
|
14661
|
-
// dist/
|
|
14660
|
+
// dist/_adapter_entry_c7dd6944-1437-4279-906e-671c0e48fdd2.ts
|
|
14662
14661
|
if (!globalThis.__openTabs) {
|
|
14663
14662
|
globalThis.__openTabs = {};
|
|
14664
14663
|
} else {
|
|
14665
14664
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
14666
14665
|
if (desc && !desc.writable) {
|
|
14667
|
-
const
|
|
14666
|
+
const ot2 = globalThis.__openTabs;
|
|
14668
14667
|
const newAdaptersObj = {};
|
|
14669
|
-
if (
|
|
14670
|
-
for (const key of Object.keys(
|
|
14671
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14668
|
+
if (ot2.adapters) {
|
|
14669
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
14670
|
+
const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
|
|
14672
14671
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14673
14672
|
}
|
|
14674
14673
|
}
|
|
14675
|
-
globalThis.__openTabs = Object.assign({},
|
|
14674
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
|
|
14676
14675
|
}
|
|
14677
14676
|
}
|
|
14678
14677
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -14710,16 +14709,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14710
14709
|
}
|
|
14711
14710
|
};
|
|
14712
14711
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
14713
|
-
var ot2 = globalThis.__openTabs;
|
|
14714
|
-
ot2._notifyReadinessChanged = () => {
|
|
14715
|
-
try {
|
|
14716
|
-
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
14717
|
-
if (nonce) {
|
|
14718
|
-
window.postMessage({ type: "opentabs:readiness-changed", plugin: "onenote", nonce }, "*");
|
|
14719
|
-
}
|
|
14720
|
-
} catch {
|
|
14721
|
-
}
|
|
14722
|
-
};
|
|
14723
14712
|
var existing = adapters["onenote"];
|
|
14724
14713
|
if (existing) {
|
|
14725
14714
|
if (typeof existing.teardown === "function") {
|
|
@@ -14731,7 +14720,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14731
14720
|
}
|
|
14732
14721
|
}
|
|
14733
14722
|
if (!Reflect.deleteProperty(adapters, "onenote")) {
|
|
14734
|
-
const
|
|
14723
|
+
const ot2 = globalThis.__openTabs;
|
|
14735
14724
|
const newAdapters = {};
|
|
14736
14725
|
for (const key of Object.keys(adapters)) {
|
|
14737
14726
|
if (key !== "onenote") {
|
|
@@ -14739,7 +14728,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14739
14728
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
14740
14729
|
}
|
|
14741
14730
|
}
|
|
14742
|
-
globalThis.__openTabs = Object.assign({},
|
|
14731
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
14743
14732
|
}
|
|
14744
14733
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
14745
14734
|
for (const tool of src_default.tools) {
|
|
@@ -14800,12 +14789,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14800
14789
|
}
|
|
14801
14790
|
}
|
|
14802
14791
|
};
|
|
14803
|
-
const
|
|
14804
|
-
if (!
|
|
14792
|
+
const ot2 = globalThis.__openTabs;
|
|
14793
|
+
if (!ot2._navigationInterceptor) {
|
|
14805
14794
|
const origPushState = history.pushState.bind(history);
|
|
14806
14795
|
const origReplaceState = history.replaceState.bind(history);
|
|
14807
14796
|
const callbacks = /* @__PURE__ */ new Map();
|
|
14808
|
-
|
|
14797
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
14809
14798
|
history.pushState = function(...args) {
|
|
14810
14799
|
origPushState(...args);
|
|
14811
14800
|
for (const cb of callbacks.values()) {
|
|
@@ -14819,7 +14808,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14819
14808
|
}
|
|
14820
14809
|
};
|
|
14821
14810
|
}
|
|
14822
|
-
const interceptor =
|
|
14811
|
+
const interceptor = ot2._navigationInterceptor;
|
|
14823
14812
|
interceptor.callbacks.set("onenote", checkUrl);
|
|
14824
14813
|
window.addEventListener("popstate", checkUrl);
|
|
14825
14814
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -14874,5 +14863,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14874
14863
|
};
|
|
14875
14864
|
delete src_default.onDeactivate;
|
|
14876
14865
|
}
|
|
14877
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["onenote"]){var a=o.adapters["onenote"];a.__adapterHash="
|
|
14866
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["onenote"]){var a=o.adapters["onenote"];a.__adapterHash="160f77c038f41ea10e4cf848ffd17c58aca811bd8679b3edc15eba12f3bc6842";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,"onenote",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
14878
14867
|
//# sourceMappingURL=adapter.iife.js.map
|