-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iframe with src="javascript:false;" defies filters #522
Comments
As expected. Cosmetic filters do not remove elements from the DOM, they are simply hidden using a CSS style |
Works as expected, see documentation regarding cosmetic filtering, known as "element hiding" in ABP: https://adblockplus.org/en/filters#elemhide. |
I have attempted HTML filters, e.g.:
Quoting from the documentation:
Did I use the html filter syntax incorrectly? |
@gorhill Oh I see, it's only supported in Firefox? Is there no way to remove the element in Chromium? |
There is no way to remove elements -- see gorhill/uBlock#2252. |
You can use a scriptlet for element-removal. |
@uBlock-user Thanks for the suggestion. I started looking into that but ended up using TamperMonkey to solve the problem: // ==UserScript==
// @name Remove ZenDesk iframe
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Solves a problem with 1Password + Freshbooks
// @author You
// @match https://my.freshbooks.com/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var iframe = document.querySelector('#zendesk-widget-iframe');
if (iframe) {
iframe.parentNode.removeChild(iframe);
}
})(); |
@jchook no need to install TM, just use https://github.com/uBlock-user/uBO-Scriptlets/blob/master/scriptlets.txt#L45 |
@uBlock-user kind of difficult to figure out how to apply this. With TM, it's "Just Javascript", takes 5 seconds, and boom it works first try. With uBlock, I get half-examples for an obscure DSL, I get your link to a .txt file containing several javascript chunks in a different repository... I have to read code to even understand how to pass arguments to scriplets. Then the docs state:
Yet |
@jchook https://github.com/uBlock-user/uBO-Scriptlets#installation (Only to be done once) Add filter in My Filters --
|
or
|
Prerequisites
Description
A specific iframe with
src="javascript:false;"
will not go away!I have tried many combinations of filters and posted a support request on Reddit with no luck.
Examples of filters I have tried:
The log appears to claim that uBO blocks the iframe.
I also tried enabling "Block 3rd party frames" with no success.
A specific URL where the issue occurs
https://my.freshbooks.com/#/login
Steps to Reproduce
iframe#zendesk-widget-iframe
elementExpected behavior:
I expect uBlockOrigin to remove the iframe from the HTML and from the DOM via various filters.
Actual behavior:
The iframe remains in both the HTML and the DOM.
Your environment
The text was updated successfully, but these errors were encountered: