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

Availability on AMO #23

Open
rayman89 opened this Issue Jul 11, 2018 · 11 comments

Comments

Projects
None yet
5 participants
@rayman89

rayman89 commented Jul 11, 2018

Sorry if this is not the appropriate place to ask this but why is the addon unlisted on AMO?

@LiCybora

This comment has been minimized.

Owner

LiCybora commented Jul 11, 2018

Because Mozilla policy of forbidding assignment of innerHTML and custom DOM library. Changing them is not an easy task as many sites are affected and some with Geo Lock or require account. It will be hard for me to ensure my changes would not affect users. Also deprecating the current DOM library might cause 20 times slower for launch.

This product was on AMO before, but removed by Mozilla due to the above reason. In the past day I tried to replace DOM library with jQuery and use alternative method for innerHTML, but I regret this decision after the need of testing affected sites. Some domains itself looks good but may not be the same story when embedded into other sites, such as video streaming service with anti-adblocking. Therefore I decide to keep it unlisted to make my life easier.

But it is welcomed if there are volunteers willing to participate. Just mark the changes and show some screenshot for relevant site to verify. Then I may re-consider for let it up on AMO. However, inform jspenguin2017 first if anyone really want to perform this job, as he is the owner and developer of this product and he knows much more than me.

Reference:
NanoAdblocker/NanoCore#41 (comment)
https://www.reddit.com/r/firefox/comments/8e8re8/why_dont_more_people_use_firefox/e0dtnnl/

@LiCybora LiCybora added the question label Jul 11, 2018

@LiCybora LiCybora changed the title from Question to Availability on AMO Jul 11, 2018

@rayman89

This comment has been minimized.

rayman89 commented Jul 11, 2018

Thank you for the explanation. I know nothing about coding so this might sound stupid but would it be possible to put the prohibited content on for example a userscript or something complementary that the user has to add after installing the addon? If that's possible it would be nice so that less experienced users are able to use this addon and get to know of it's existence. For example I thought the addon was dead because it was not on AMO anymore and AAK cont was discontinued.

I'm not sure if you said you need help testing sites. If it does not require coding only testing I might be able to help with that. Let me know if that's the case.

@jspenguin2017

This comment has been minimized.

jspenguin2017 commented Jul 12, 2018

Anti-adblock defusers like this cannot be implemented as Userscripts, that is why I rewrote 5k+ lines of code twice to make it a WebExtension (first from Reek's AAK to an Userscript, then from the Userscript to an extension). Modern Userscript hosts have really bad race conditions that cause a lot of problems.

For switching libdom to jQuery, you need to rewrite all 5k+ lines of content rules, as libdom is not designed to be compatible with jQuery and is fundamentally different than jQuery. I am unhappy about how jQuery works, it is an insanely bloated library and it's too late for them to change, so good luck on replacing libdom.

@LiCybora

This comment has been minimized.

Owner

LiCybora commented Jul 12, 2018

I'm not sure if you said you need help testing sites. If it does not require coding only testing I might be able to help with that. Let me know if that's the case.

No, not as easy as you think. Some sites with restricted access such as geo lock and require account, which increase difficulty for testing. Even not these cases, at least you have to know why the codes not work and what goes wrong, or it help nothing for fixing.

For switching libdom to jQuery, you need to rewrite all 5k+ lines of content rules, as libdom is not designed to be compatible with jQuery and is fundamentally different than jQuery.

That's why I finally give up and keep it unlisted, at least at this moment. Even I can rewrite them, I don't have time to test all those sites and I believe something would goes wrong. Deviating from upstream might also causing performance/issues difference between two browsers, and probably require two different solutions for some sites (as rules are rewritten). At this moment I want to keep a usable Nano Defender/Adblocker on Firefox first. Whether it is up on AMO is relatively low priority.

@icl7126

This comment has been minimized.

icl7126 commented Aug 26, 2018

Hello @LiCybora ,
I've started a discussion also on Discourse Mozilla:
https://discourse.mozilla.org/t/get-nano-defender-for-firefox-add-on-to-amo/31214

It's a friendly forum for add-on developers with a lot of skilled people.

@jspenguin2017

This comment has been minimized.

jspenguin2017 commented Aug 26, 2018

I haven’t tested this out in detail but it seems like it should work

No, it doesn't.

image
image


Go check out how jQuery did it. It's not easy, you'll be looking at 100+ lines of code. The file linked here is only 65 lines but it does use quite a few other files.
https://github.com/jquery/jquery/blob/master/src/core/parseHTML.js
image

@jspenguin2017

This comment has been minimized.

jspenguin2017 commented Aug 26, 2018

Note: The foregoing assumes that html does not contain its own body tag. I assume that’s true in the context of this extension.

That's not a safe assumption.


  while (j>0){
    s.appendChild(htdoc.body.childNodes[0]); 
    j--;
  }

Why not just:

  while (j--)
    s.appendChild(htdoc.body.childNodes[0]); 
@jspenguin2017

This comment has been minimized.

jspenguin2017 commented Aug 27, 2018

Also, for Ace, you'll be looking at 20,000+ lines of code. And yes, Ace uses innerHTML.

uBO uses CodeMirror, gorhill somehow managed to patch innerHTML off CodeMirror. In term of performance, Ace has a longer initial load time but CodeMirror is chunky during runtime, which I don't like.

ND doesn't use Ace for now, but Nano does. If you want both extensions to be on AMO, then have fun with that.

@TonyTough

This comment has been minimized.

TonyTough commented Sep 26, 2018

I noticed that the link
Get Nano Defender for Firefox (Unlisted, Beta, Maintained by @LiCybora)

has been removed from the Nano Defender homepage
https://jspenguin2017.github.io/uBlockProtector/

Is there a specific reason for this?

@jspenguin2017

This comment has been minimized.

jspenguin2017 commented Sep 26, 2018

@TonyTough I noticed that the port was taking over 5 days to pull changes, and I wan't sure whether the port is still active. If @LiCybora can confirm that he is back again, I will put the link back up.

@LiCybora

This comment has been minimized.

Owner

LiCybora commented Sep 27, 2018

@jspenguin2017 Yes I am here. Sorry for being busy to update in two weeks ago. I apologize for any inconvenience.

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