Skip to content

Commit

Permalink
feat(data): add new elements and improve loops performance
Browse files Browse the repository at this point in the history
  • Loading branch information
andyMrtnzP authored and wanhose committed Dec 7, 2021
1 parent 8b85c98 commit 532ecc2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion data/elements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12473,4 +12473,17 @@ body#Viewport.hide-outline > .default > div[aria-modal="true"][role="dialog"]
wsp-modal-window[data-type="cookie-modal"]
#lgcookieslaw_modal
.no-js > body > .headertopfixed.fixed ~ .bg_popup
#data-cookie
#data-cookie
.overlay-context.no-banner[data-v-5b5bbc81]
.cc_css_reboot.cc_dialog.dark.headline
[data-component-id="banner"]
._3RhWPJfjpsEoBw52x0fQp2
.nav-new-cookie-disclaimer
.js-notification.js-notification-cookie-banner.notification.notification-fixed-bottom.notification-foreground
.ix.u.kh.ki.kj.kk.kl.km.kn.ko.kp.kq.kr.ks.dj.cw.kt.ku.kv
[widgetid="PopupSignupForm_0"] > div.mc-modal[data-dojo-attach-point="modalContainer"]
#mw-mf-viewport #article_courses_banner
div#termsandconds[data-backdrop="static"]
div.ec-notices.ec-notices--animation-default.ec-notices--order-direct.ec-notices--fixed.ec-notices--top.ec-notices--right
div._1MLS_xjiUjam_u2qmURY4i[data-tracking-opt-in-overlay="true"]
div.notification--1vSvk.entered--3hIPp[role="alert"]
8 changes: 4 additions & 4 deletions scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ const observer = new MutationObserver((mutations, instance) => {
fix();

if (!isPreview) {
mutations.forEach((mutation) => {
mutation.addedNodes.forEach((node) => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
const valid = check(node);

if (valid && node.matches(selectors)) node.outerHTML = "";
});
});
}
}
}

instance.observe(target, options);
Expand Down

0 comments on commit 532ecc2

Please sign in to comment.