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

[Bug] Patching custom webkit pages #127

Open
2 tasks done
SpaceEnergy opened this issue Oct 10, 2024 · 11 comments
Open
2 tasks done

[Bug] Patching custom webkit pages #127

SpaceEnergy opened this issue Oct 10, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@SpaceEnergy
Copy link
Contributor

Before Reporting

  • I found no existing issues matching my bug
  • My issue is not caused by a theme

Describe the Bug

It is not possible to patch webkit itself with own url's (only default patching) that means if I want to patch e.g. the store page with an option it does not work

"super special option": {
            "description": "super special option description",
            "default": "yes",
            "tab": "Experimental",
            "values": {
                "no": {},
                "yes": {
                    "TargetCss": { "affects": ["https://.*.steampowered.com"], "src": "options/experimental/option.css" },
                    "TargetJs": { "affects": ["https://.*.steampowered.com"], "src": "options/experimental/option.js" }
                }
            }
        }

Expected Behavior

normal patching, i.e. CSS and JS are also patched on the specified page

Steps To Reproduce

  1. add option or patching for a webkit page (like "https://.*.steampowered.com")
  2. add some css
  3. enable option
  4. and see

Operating System

Windows

Anything else?

No response

@SpaceEnergy SpaceEnergy added the bug Something isn't working label Oct 10, 2024
@shdwmtr
Copy link
Owner

shdwmtr commented Oct 16, 2024

Still trying to figure out a way to do this. Unfortunetly, with the way CSS & JS is hooked, it doesn't provide any information about the url the CSS/JS is being requested from.

@shdwmtr
Copy link
Owner

shdwmtr commented Oct 16, 2024

I may have come up with a solution, but it might not be good. Ill branch it and let you test it. Once its done give me your honest opinion on it

shdwmtr added a commit that referenced this issue Oct 16, 2024
@shdwmtr
Copy link
Owner

shdwmtr commented Oct 16, 2024

DM me on discord, I'll send you the release.

shdwmtr added a commit that referenced this issue Oct 26, 2024
* feat: Better webkit patching #127

* chore: Make artifact CI (#140)

* chore: Linux CLI bug fixes

* chore: Update plugin JSON schema

* chore: Update TODO

* chore: Fix artifact build scripts
github-actions bot pushed a commit that referenced this issue Nov 2, 2024
# [2.13.0](v2.12.4...v2.13.0) (2024-11-02)

### Bug Fixes

* Add file description and details to help prevent false positives. ([0fd35ad](0fd35ad))
* Create debugger flag from installer instead of Millennium ([652945d](652945d))
* Fix all issues with steam re-opening unskinned, and the UI freezing ([6f5cd67](6f5cd67))
* Fix std::future_error by mutex ([75dd852](75dd852))
* Fix uninstaller bugs and improve cleanup ([a923e2a](a923e2a))
* Fully fix plugin hot reloadability. Plugins can now be loaded/unloaded at any time, in any order ([af651b5](af651b5))
* Temporarily disable CLI support for Millennium on windows. ([02d9a76](02d9a76))

### Features

* Ability to override system accent color ([a850936](a850936))
* Add regex support for webkit patching ([#147](#147)) ([0c87da1](0c87da1)), closes [#127](#127) [#140](#140)
@shdwmtr
Copy link
Owner

shdwmtr commented Nov 7, 2024

I can't remember what happened with this issue. Does it work for you? Because it was added a few updates ago.

@SpaceEnergy
Copy link
Contributor Author

still doesn't work for me

@shdwmtr
Copy link
Owner

shdwmtr commented Nov 7, 2024

what was the config you used?

@SpaceEnergy
Copy link
Contributor Author

"VAC-Ban visibility": {
            "description": "Hide the VAC ban from your profile or on all profiles (currently not working)",
            "default": "Show",
            "tab": "Steam bloat",
            "values": {
                "Show": {},
                "For me": {
                    "TargetCss": { "affects": ["https://steamcommunity.com"], "src": "options/steamBloat/vacBan/me.css" }
                },
                "For all": {
                    "TargetCss": { "affects": ["https://steamcommunity.com"], "src": "options/steamBloat/vacBan/all.css" }
                }
            }
        },

or

"Wishlist grid": {
            "description": "Changes the view of the wishlist from a list to a grid",
            "default": "yes",
            "tab": "Experimental",
            "values": {
                "no": {},
                "yes": {
                    "TargetCss": { "affects": ["https://.*.steampowered.com"], "src": "options/experimental/wishlistGrid.css" },
                    "TargetJs": { "affects": ["https://.*.steampowered.com"], "src": "options/experimental/wishlistGrid.js" }
                }
            }
        }

@shdwmtr
Copy link
Owner

shdwmtr commented Nov 7, 2024

Hmm, try putting a url regex match under Patches and see if it works there

@SpaceEnergy
Copy link
Contributor Author

is that what you mean?:

{
            "MatchRegexString": "https://.*.steampowered.com",
            "TargetCss": "webkit.css"
}

@SpaceEnergy
Copy link
Contributor Author

SpaceEnergy commented Nov 8, 2024

whereby

        "VAC-Ban visibility": {
            "description": "Hide the VAC ban from your profile or on all profiles (currently not working)",
            "default": "Show",
            "tab": "Steam bloat",
            "values": {
                "Show": {},
                "For me": {
                    "TargetCss": { "affects": ["https://steamcommunity.com"], "src": "options/steamBloat/vacBan/me.css" }
                },
                "For all": {
                    "TargetCss": { "affects": ["https://steamcommunity.com"], "src": "options/steamBloat/vacBan/all.css" }
                }
            }
        }

will be patched but

        "Wishlist grid": {
            "description": "Changes the view of the wishlist from a list to a grid",
            "default": "yes",
            "tab": "Experimental",
            "values": {
                "no": {},
                "yes": {
                    "TargetCss": { "affects": ["https://store.steampowered.com"], "src": "options/experimental/wishlistGrid.css" },
                    "TargetJs": { "affects": ["https://store.steampowered.com"], "src": "options/experimental/wishlistGrid.js" }
                }
            }
        }

not

@shdwmtr
Copy link
Owner

shdwmtr commented Nov 30, 2024

This should be fixed in the next update, I found a great way to get around the issues I faced before!

github-actions bot pushed a commit that referenced this issue Dec 19, 2024
# [2.16.0](v2.15.0...v2.16.0) (2024-12-19)

### Bug Fixes

* **CI:** Fix CI ([b897b49](b897b49))
* **CI:** Fix CI ([914df34](914df34))
* Close installer after successful install ([cfd961c](cfd961c))
* Fix plugin JS being removed from webkit when a new theme is selected. ([a29c7df](a29c7df))
* Fix settings icons not being centered and plugin settings button not having propper styling ([#184](#184)) ([5fddc2d](5fddc2d))
* Fix system accent color not working on some startups ([2eb7a94](2eb7a94))
* Fix the artifact CI ([3faf711](3faf711))
* Fix typo in install.sh ([#178](#178)) ([76349b3](76349b3)), closes [#4](#4)
* Fix typo on themes page [#168](#168) ([e05ec19](e05ec19))
* Prevent debug info from growing insanely large [#176](#176) ([d23bec9](d23bec9))
* **Unix:** Fix LD_PRELOAD variable interfering with Steam games. ([cbfd653](cbfd653))
* Use correct classes for Field ([#189](#189)) ([4ce6b5d](4ce6b5d))

### Features

* Add better webkit support for plugins ([33b6cde](33b6cde))
* Add Swedish localization. ([#180](#180)) ([0d9e8b4](0d9e8b4))
* Added CPS bypass & Added Millennium API to webkit modules ([eda0f54](eda0f54))
* Conditional webkit patching based on URL with regex [#127](#127) ([bf36bd5](bf36bd5))
* **Security:** Blacklist certain pages, like the checkout, from being injected into by plugins. ([54edc4c](54edc4c))
* Slightly Better Russian Translation ([#187](#187)) ([639390d](639390d))
* Softer and better crash detection. ([fc5e756](fc5e756))
* Updated plugin support for better webkit modding. ([1a8daf0](1a8daf0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants