Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

[Discussion] Automation and AAK-Cont #665

Closed
jspenguin2017 opened this issue Oct 25, 2017 · 31 comments
Closed

[Discussion] Automation and AAK-Cont #665

jspenguin2017 opened this issue Oct 25, 2017 · 31 comments
Labels
Archived This thread was archived, open new issues for similar problems. Fixed

Comments

@jspenguin2017
Copy link
Owner

jspenguin2017 commented Oct 25, 2017

Important Update:

AdBlock Protector 2 is ready for developer beta, it currently only work with uBlock Origin (any browser), because even though I have libmicro code in there I'm 150% sure it's bugged beyond belief.
Be warned that on Quantum, libquantumizer will inject 'unsafe-inline' to every page. This may change in the future when the CSP bug is fixed in Quantum.

Because ABR2 is now ready for developer beta, AAK-Cont will now stop accepting new issues, it will still be available for download, and the daily build task will run until ABR2 hits stable for 1 month.

https://adblockprotector2.github.io/AdBlockProtector2/


Things are getting boring and repetitive here, and no one wish to help on AAK-Cont side. Let's solve these two problems at once.

When we talk about AAK-Cont, we think about cross browser support. Unfortunately, that project have not attracted enough attention and support, so I will end-of-life it if my following plan went as planned.
[Update: I meant not enough attention from developers]

I want to create a new project, name undecided [Update: decided below], which will support Chrome, Chromium, Opera, and Quantum browsers; uBlock Origin, Adblock Plus, and AdBlock adblockers. Just like this project, it will be composed of a filter list and an extension (not Userscript). Support for Safari will be dropped and support for Edge is undecided.
You are probably thinking, wouldn't that be even more boring and repetitive? Well, yes, unless... unless I have a bot to maintain all those repositories for me, it will scan for changes every day, and generate compatibility shim for each setup.

Not sure how well this will go, I already have a graveyard of failed projects, one more wouldn't hurt. The important part is having fun.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Oct 25, 2017

Extension Design

Update: This takes a bit of work to implement and I'm not sure how much value will it add. For now, libmicro will kick in when uBO is not present and the bootstrapper will not check for other configuration.

One major problem we are having is that people don't know what to install. Although I like the idea of letting the user to decide what to do, an average person can't make a good decision. Therefore, for the new project and the new project only, the companion extension will perform some testing:

  • When background script is starting up:
    • If the adblocker it is designed to work with is found, that adblocker will be enabled and all other adblockers will be disabled; if at least one management action is performed, the user is notified and will be given the option to revert changes and uninstall the companion extension in one click
    • If the adblocker it is designed to work with is not found:
      • If another adblocker is found, the companion extension will notify the user, bring the user to the install page of the correct companion extension, and uninstall itself
      • If another adblocker is not found, the companion extension will notify the user and disable itself
    • If extensions that are known to cause problems are found, they will be disabled and the user is notified; the user will be given the option to revert changes and uninstall the companion extension in one click
  • When content script is executed:
    • If the correct filter list is not installed, the companion extension will notify the user and bring the user to the correct install page
    • If the filter list for another companion extension is installed, the companion extension will notify the user and bring the user to instructions on how to fix his configuration

@jspenguin2017
Copy link
Owner Author

Bot Design

The bot will be equipped with a few parser and a few compatibility shim generators. It will download uBlock Protector and uAssets repositories, and generate code that would work for each platform once a day. It will also respond to explicit commands from me.
This is the hard part, but also the fun part, I will be thinking and planning this in the coming weeks and hopefully I can get a working prototype by the end of the year.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Oct 25, 2017

TODO List

  • Make Adblock Plus filter converter

Shims

  • Quantum (WebExt) API shim, code name libquantumizer (LQ for short)
  • Scriptlet injector / important filter enforcer, code name libmicro (LM for short)
  • Edge API shim, code name libedgyfy (LE for short)

@jspenguin2017
Copy link
Owner Author

Reserved

@uBlock-user
Copy link

uBlock-user commented Oct 25, 2017

Merge this into uBlock Protector and run it when it's ran for the first time and detect the setup, so give shim to those who're on other blockers and keep Protector for uBO users. Doable ?

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Oct 25, 2017

@thrwat I don't, that's why I'm getting a bot to help me out. And don't thank me yet, the future is unknown.

@uBlock-user Manifest configuration cannot be changed programmatically on Chromium, although I will investigate that idea for the companion extension for Quantum.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Oct 27, 2017

The new project will be called AdBlock Protector 2 (ABR2 for short). https://github.com/AdBlockProtector2
The bot will be called Alpha Bot, bot account name undecided, please refrain from rushing out registering every good name that starts with Alpha.

uLint is renamed to FilterLinter and moved under ABR2, same for EinZinY.

@KonoromiHimaries
Copy link

KonoromiHimaries commented Oct 29, 2017

Unfortunately, that project have not attracted enough attention and support

i think this is not good marketing
2017-10-29 14_05_48-ublock protector extension - chrome web store

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Oct 29, 2017

Not this project, AAK-Cont: https://xuhaiyang1234.gitlab.io/AAK-Cont/
I think it looks OK, if you can get a better design, let me know. I'm programmer, not artist, my art skill stinks and I know it.

Also, I mean I haven't got enough attention from other developers, there are plenty of users and issues are stacking up in AAK-Cont but no one wants to help solving them.

I'm not trying to market uBlock Protector, as I use it, so it has 1 user or 1 million doesn't change anything, I'm not trying to get people to use it. If you found someone on forums who advertises uBlock Protector, then that person is NOT me.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 4, 2017

I think it's a good opportunity to clean up some inefficient server code, I also moved /API/uBlockProtector to just /uBlockProtector, if there are any path that I forgot to change, let me know.
Hopefully I didn't introduce any vulnerability while moving stuff around...

I still need to clean up the ultra slow client, although it's not as much of a priority since modern devices can handle the inefficiency. I'll start making the bot next week or the week after, anyone know a good GraphQL client library for Node?

@uBlock-user
Copy link

anyone know a good GraphQL client library for Node?

https://github.com/f/graphql.js ??

@Piter432
Copy link

Piter432 commented Nov 5, 2017

Why no userscript? :(

@jspenguin2017
Copy link
Owner Author

Userscript depends on script hosts, which are made by independent author without consensus. There are no international standard for Userscript, making development impossible.

@uBlock-user
Copy link

UserScripts can't use browser API directly, which is a limitation.

@lfmnovaes
Copy link

I prefer this way, a complementary extension for uBlock. Looking forward to see the FF57 version of this.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 7, 2017

It will probably only run on 58+ of Quantum.
57 has incomplete APIs and broken CSP, I don't think it's possible to make a version that runs on 57 without breaking some security features.

I haven't started coding the bot yet, don't expect it before next year.

@jspenguin2017
Copy link
Owner Author

I need to learn GraphQL, write a filter parser and transpiler, then make a customer service bot. I have only 1 line of code at the moment, at current pace, I won't be done before 2020. If someone wants to speed things up, PRs are welcomed over at AlphaBot repo.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 13, 2017

I have 3 lines of code now. Progress...
Maybe I should make it a standalone application instead of integrating into my existing server.

Also I rewrote clients, profiler shows they are 20 times faster, but whatever, they weren't slow to begin with.

@jspenguin2017
Copy link
Owner Author

Quantum 57 hit stable! Time to code!

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 17, 2017

I'm not sure how to use Quantum's debugger, ABR2 definitely works on Chrome, but I still have some debugging to do for Quantum, if someone wants to test it out, it's available for developers now. (See update in the opening)

What to report:

  • Crashes
  • Does not for for a group of domains (example: fail on every page that has CSP)

What to not report:

  • One website where it doesn't work
  • Installation difficulties (it's for developers only for now)

Also, don't report here, it'll get messy, report to ABR2 issues tracker. Also refrain from posting "same here" or "+1", use the thumbs up (or down in case you can't reproduce) emoji instead.

@siric
Copy link

siric commented Nov 17, 2017

Bot Design

The bot will be equipped with a few parser and a few compatibility shim generators. It will download uBlock Protector and uAssets repositories, and generate code that would work for each platform once a day. It will also respond to explicit commands from me.
This is the hard part, but also the fun part, I will be thinking and planning this in the coming weeks and hopefully I can get a working prototype by the end of the year.

Have you considered using Webpack for this? After setting up it's configs it could do all of the automation for you, include the defined shims per browser, and generate builds for the supported browsers with one single command. Example boilerplate: https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 17, 2017

Currently the extension is universal, the single extension runs in every supported browser. Shims will activate themselves on runtime. The build bot really just pull 4 repositories (with child-process) then copy some files around, really no need for an external framework. Most of the work is making libmicro and splitting filter lists.

@jspenguin2017
Copy link
Owner Author

jspenguin2017 commented Nov 17, 2017

It's almost ready, I just need to make a costume service bot then it's ready for public beta.
Anyone know how do you inspect options page in Quantum? I can't seem to be able to inspect inside that element...
image

@siric
Copy link

siric commented Nov 17, 2017

Tried to inspect the same thing but looks like that's not possible. Why would you need that though? I don't believe you can give that any styling if that's what you wanted to do because FF enforces it's design guidelines on it - unless you do a custom settings page.

@jspenguin2017
Copy link
Owner Author

Styling does work, except the right border is missing, and I was trying to understand why. That page is fully inspectable on Chrome though.

@jspenguin2017
Copy link
Owner Author

Alright, the developer beta is fully ready now, it should work in Quantum and Edge (and Chrome ofc). Let's continue the discussion over in that repository.

@uBlock-user
Copy link

Are you going to discontinue uBlock Protector once AdBlockProtector2 is stable ?

@jspenguin2017
Copy link
Owner Author

No, uBR is a dependency of ABR2.

@jingyu9575
Copy link

jingyu9575 commented Nov 20, 2017

how do you inspect options page in Quantum

The inspector works here on 58.0b4 (Developer Edition) when out-of-process extensions are disabled. When it didn't work, I could debug the extension in about:debugging and switch the frame default to the option page, and then the page would be inspectable there.

@jspenguin2017
Copy link
Owner Author

OK, I'll try that when 58 hits stable.

@github-actions github-actions bot added the Archived This thread was archived, open new issues for similar problems. label Aug 22, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Archived This thread was archived, open new issues for similar problems. Fixed
Projects
None yet
Development

No branches or pull requests

8 participants
@Piter432 @KonoromiHimaries @jspenguin2017 @jingyu9575 @lfmnovaes @uBlock-user @siric and others