0

On this page https://www.eventbrite.com/checkout-external?eid=97762112109 I would like to block the check box with the legend "Eventbrite can send me emails about the best events happening nearby." but not the two elements with two checkboxes just above this.

However, they have very similar CSS selectors

.eds-l-mar-bot-4 > div:nth-child(1) > label:nth-child(3) > span:nth-child(1)

#A-e6af8ecdbc0e4cfb9dffa92eaac12e8b\.U-31705869 > div:nth-child(1) > div:nth-child(1) > label:nth-child(3) > span:nth-child(1)

respectively, and on most pages (such as https://www.eventbrite.com/checkout-external?eid=97989109063 ) there is only one (the last) checkbox so the nth-child might vary.

Any ideas how to block just the last checkbox on all pages, both them with just one checkbox as well as those with several checkboxes?

(Blocking the first two checkboxes prevents the page from working as expected)

uBlock in Firefox. Currently I use www.eventbrite.com##.eds-checkbox but it blocks all checkboxes.

1 Answer 1

1

I inspected the site structure manually and I think eventbrite.com###buyer~section is what you want to use.
This selector is not very specific, but not worse than the one you proposed.

Optionally you can use this fancy very specific one if you really want to make sure not to block anything wrong: eventbrite.com##section:has(>section>div>label>span:has-text(Eventbrite can send me emails about the best events happening nearby.))

1
  • Thank you, will try!
    – d-b
    Mar 9, 2020 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.