@ckeditor/ckeditor5-integrations-common
Version:
This package implements common utility modules for integration projects.
36 lines (35 loc) • 1.02 kB
JavaScript
const o = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), r = "https://cdn.ckeditor.com";
function n() {
s(), i();
}
function s() {
[...document.querySelectorAll("script")].filter((e) => e.src.startsWith(r)).forEach((e) => {
t.delete(e.src), e.remove();
}), delete window.CKEDITOR, delete window.CKEDITOR_PREMIUM_FEATURES, window.CKEDITOR_VERSION = "";
}
function i() {
[...document.querySelectorAll("link")].filter((e) => e.href.startsWith(r)).forEach((e) => {
o.delete(e.href), e.remove();
});
}
const c = "https://cdn.ckbox.io";
function l() {
d(), C();
}
function d() {
[...document.querySelectorAll("script")].filter((e) => e.src.startsWith(c)).forEach((e) => {
t.delete(e.src), e.remove();
}), delete window.CKBox;
}
function C() {
[...document.querySelectorAll("link")].filter((e) => e.href.startsWith(c)).forEach((e) => {
o.delete(e.href), e.remove();
});
}
function f() {
n(), l();
}
export {
f as removeAllCkCdnResources
};
//# sourceMappingURL=index.js.map