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

Add support for backdrop-filter, among other stuff #8

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

TheBITLINK
Copy link

The backdrop-filter CSS adds many possibilities, but it's only available through the --enable-experimental-web-platform-features flag.

While one can edit all discord launchers and shortcuts to include the flag, wouldn't it be nice to have this integrated into BeautifulDiscord itself? (since it's focused at styling)

Thankfully, the Electron API provides a method to add chrome flags before launching the renderer process, and this PR makes use of said API to add the cli switch.

This might also allow some other experimental CSS features.

... and other stuff, maybe?
@TheBITLINK
Copy link
Author

Just noticed the same can be achieved with

    webPreferences: {
        blinkFeatures: "EnumerateDevices,AudioOutputDevices",
+       experimentalFeatures: true
     }

But i would like to hear your opinion

@leovoel
Copy link
Owner

leovoel commented Dec 15, 2016

sure, sounds fine to add this. i'd rather put it behind a flag of some sort though.

i'd also like to make it toggleable, i.e. you can pass either --experimental-features or --disable-experimental-features and it would do the right thing. if i did #7 i'd treat it the same way.

@TheBITLINK
Copy link
Author

Actually, i just found a way to enable only backdrop filters without enabling experimental features at all, do you think a flag would still be necessary?

@ghost
Copy link

ghost commented Dec 16, 2016

Would it be possible to have a separate toggle for both? I'd love to try the experimental stuff but I don't really have a use for backdrop filters.

@Martmists-GH
Copy link

I'd prefer to see a toggle for both as well as it opens up a lot more possibilities on my end.

Rapptz and others added 17 commits May 16, 2017 06:30
Pass a directory to --css and we will watch and apply changes within that
directory. (We will only look at files with the .css extension).

This change introduces a new restriction that single watched files also need to
have the css extension.

Tested: Windows Discord Canary, watching single file, watching directory,
adding, removing, editing, renaming within that directory, running
applyAndWatchCSS in console. Everything seems to work.
This avoids unpacking the asar since it's unnecessary.

No Linux support at the moment.
tested on 10.10.5 for discordcanary
The previous location could be overridden which is not preferable.
This requires re-packing the asar file after we make our modifications
which is admittedly a bit slow unfortunately but there's nothing we can
do about it.
Moves it over to ~/.beautifuldiscord/cssInjection.js, should solve most
of the permission errors and ceases to require root.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants