myjian / mai-tools

mai-tools is a collection of useful tools for maimai and maimai DX.
https://myjian.github.io/mai-tools
GNU General Public License v3.0
39 stars 11 forks source link

[FR] Font smoothing, develop a chrome extension #73

Closed evnchn closed 8 months ago

evnchn commented 10 months ago

IMPORTANT: Do not merge. Will break everything.

Please manually inspect extmai-creator.py and userscript.js to see if it is possible to:

myjian commented 10 months ago

The description about this pull request deserves more context about a) what problem you're trying to solve, b) how your code will solve it, and c) how to test it.

There is no need to conflate font smoothing and browser extension. They are 2 different things. If you care about font smoothing very much, please make a separate pull request. Below I'll focus on the extension part.

About creating browser extension, I did not do it for 2 reasons

  1. Chrome extension is not supported on mobile, so usage will be limited and can be supported by bookmarklet.
  2. The human effort needed to publish new version whenever the code changes is non-trivial / annoying.

So I would prefer not to create a browser extension unless the publishing process is low or no effort. I did look into articles about creating a Github Action to upload to Chrome Web Store but I have not gotten enough motivation to actually try it out.

evnchn commented 10 months ago

I agree with your points about font smoothing. Actually I have done more testing and, preliminarily, bad font rendering only occurs on low-DPI screens, so the users impacted is not a lot.

For the extension: That night, I am trying to explore the possibility to developing extensions, but now I see that you have also explored this idea as well.

For point 1, it is valid. However, on the mobile side, users can still use Firefox extensions. Though, then again, they can use a userscript manager (which has concerns below).

For point 2, it depends.

I think, in the near future, I will publish the V2 extension to the chrome web store to get a feel of what its like to manage a chrome extension. If you want to do it instead, please tell me.

There are potential issues with trying to run a userscript manager in a V3-only landscape, therefore it is still more secure if a V3-compliant extension is developed before support is dropped for V2. I think I can do so by listening to changes in the GitHub Deployments, downloading the JS by a script, and upload that way, but I think we can agree that GitHub Actions > Human Actions, so I may try to do GitHub Actions integration as well.

You have every right to close this pull request if the extension creator code and font smoothing code doesn't seem useful to you. I'll try my best to work on the stated goals meanwhile in my own fork.

evnchn commented 8 months ago

Closing this PR to clear up space and as userscripts are likely staying for just a while longer. Chrome is likely not winning this round. At least not now.

Progress on developing V3-compliant chrome extensions has not started, because of a lack of time.