Skip to content

Add scriptlets remove-class and alert-buster-silent #935

@Crystal-RainSlide

Description

@Crystal-RainSlide

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

On wikiHow, there is a class called hasad, and when the ad is blocked, this class causes some small issues on the appearance of the page.

'hasad' removes the padding

Writing UserStyle or :style rules helps, but remove those class works once for all. So, I hope there is a remove-class scriptlet to deal with what remove-attr can't do.

alert-buster-slient is less important. Maybe it's +js(alert-buster, slient), maybe there will be a scriptlet which can handle alart(), confirm() and prompt().

A specific URL where the issue occurs

https://www.wikihow.com/Prevent-Coronavirus

Steps to Reproduce

N/A

Expected behavior:

hasad can be removed by something succinct.

Actual behavior:

Have to use this:

// ==UserScript==
// @name              Remove class
// @namespace         RainSlide
// @icon              https://*.wikihow.com/*
// @version           1.0
// @grant             none
// @run-at            document-idle
// ==/UserScript==
document.querySelectorAll('.hasad').forEach(
  hasad => hasad.classList.remove("hasad")
);

Your environment

  • uBlock Origin version: v1.25.0
  • Browser Name and version: Firefox 73
  • Operating System and version: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfixedissue has been addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions