Skip to content
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

mega.nz video AD #7202

Closed
ghost opened this issue Apr 6, 2020 · 13 comments
Closed

mega.nz video AD #7202

ghost opened this issue Apr 6, 2020 · 13 comments

Comments

@ghost
Copy link

ghost commented Apr 6, 2020

URL(s) where the issue occurs

https://animeblix.com/boku-no-hero-academia-temporada-4-episodio-25-UzyNwErv

Describe the issue

Ad in video

Screenshot(s)

click in mega: https://i.imgur.com/zheu5ZC.png

ad: https://i.imgur.com/PToFSHC.png

Versions

  • Browser/version: [Chrome]
  • uBlock Origin version: [v1.24.4]

Settings

  • Default

Notes

embed video in animeblix.com:

https://mega.nz/embed#!XUhVXbSD!yjeq5-igC6lQpVZjOrezJlPduqRbMCZXGEbq42ZGkUI

@uBlock-user
Copy link
Contributor

uBlock-user commented Apr 6, 2020

MEGA sets a CSP so scriptlets will not work on Firefox and json-prune doesn't stop the ads from getting loaded even we disable CSP on Firefox.

@uBlock-user
Copy link
Contributor

uBlock-user commented Apr 6, 2020

Setting localStorage item pra to {"1":99999999} works.

@uBlock-user uBlock-user changed the title mega.nz - AD mega.nz video AD Apr 6, 2020
@uBlock-user
Copy link
Contributor

uBlock-user commented Apr 6, 2020

For Chromium browsers, where site CSP is not an issue, this scriptlet works --

(() => {
		'use strict';
		const item = 'pra';
		const setItem = ev => {
		 			   if (ev) { window.removeEventListener(ev.type, setItem, true); }
					   try {
							if (localStorage.getItem('pra') !== null) { return; }
							localStorage.setItem('pra', '{"1":99999999}');
					   } catch { }
		};
		if (document.readyState === 'loading') {
		    	    window.addEventListener('DOMContentLoaded', setItem, true); 
	   	} else {
		    	    setItem();
	   	}
})();

Will work for Firefox too but will need a bad workaround by disabling CSP functionality via about:config

uBlock-user added a commit that referenced this issue Apr 6, 2020
@mapx-
Copy link
Contributor

mapx- commented Apr 12, 2020

not fixable with the current weapons

@ghajini
Copy link
Collaborator

ghajini commented Apr 12, 2020

Why labelled "won'tfix" if there are chances gorhill will fix in near future?

May be good label= Currently No Solution

@liamengland1
Copy link
Contributor

Probably to add a localstorage scriptlet we would need a few more use cases on other sites.

@uBlock-user
Copy link
Contributor

uBlock-user commented Apr 12, 2020

Why labelled "won'tfix" if there are chances gorhill will fix in near future?

Because it's not fixable with current scriptlets as mapx already said. It will be removed when a fix is added, untill then, label is for clarification. All cases which are fixed never get a label.

@gorhill
Copy link
Member

gorhill commented May 7, 2020

I am not subscribed to receive notifications from here -- the reddit thread led me here.

Whenever there are cases that are unsolvable with current arsenal, please mentions me. I have to be aware of all these case for me to understand what is missing in uBO and what is worth to work on. It's also useful to know whether other blockers can deal with these.

@ghajini's suggestion make sense, having a label can't fix or something like this would help list all the currently unsolvable cases to make development decisions.

@mapx- mapx- added can't fix and removed wontfix labels May 7, 2020
@mapx- mapx- reopened this May 7, 2020
@liamengland1
Copy link
Contributor

liamengland1 commented Jul 26, 2020

The code is open source FYI:

https://github.com/meganz/webclient/blob/8bbb12ca0489de74792274459584aed485270f76/js/utils/media.js#L1434

@ghost
Copy link

ghost commented Jul 26, 2020

a filter of this style would work?: Content-Security-Policy

||mega.nz^$csp=script-src etc.. 🤔

@liamengland1
Copy link
Contributor

why closed?

@gwarser
Copy link
Contributor

gwarser commented Jul 7, 2021

@llacb47 They stopped playing ads? I think someone mentioned this on Reddit.

@uBlock-user
Copy link
Contributor

#9528 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants