Skip to content

[Bug] Missing comma in injected ad-hiding CSS leaves a V2EX ad separator visible #1284

Description

Bug

src-tauri/src/inject/style.js builds a comma-separated display: none selector list to hide ads/clutter on built-in apps. One selector is missing its trailing comma, so it silently merges with the next one:

#Main > div.box:nth-child(8) > div   // <-- no comma
#Wrapper > div.sep20,

Without the comma these two lines parse as a single descendant selector:

#Main > div.box:nth-child(8) > div #Wrapper > div.sep20

On V2EX, #Main and #Wrapper are sibling top-level containers (#Wrapper is not nested inside #Main), so this compound selector matches nothing. The result:

  1. #Main > div.box:nth-child(8) > div is no longer hidden.
  2. #Wrapper > div.sep20 (an ad separator block) is no longer hidden either.

Every other selector in the list ends with a comma, so this is a typo.

Fix

Add the missing comma after #Main > div.box:nth-child(8) > div. PR attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions