openstyles / stylus

Stylus - Userstyles Manager
https://add0n.com/stylus.html
GNU General Public License v3.0
5.48k stars 305 forks source link

[Bug] Styles no longer get applied to Google Chat #1802

Closed faulknermano closed 3 months ago

faulknermano commented 3 months ago

Bug Report

Bug Description

To simplify the problem here are my steps to reproduce:

If I try to override this using

@-moz-document url-prefix("https://mail.google.com/chat") {
    /* Insert code here... */
    .Zc1Emd, .wdoEHc {
        font-family: "Rubik"
    }
}

This doesn't change the font (although this worked before).

If I look at the computed values and source stylesheet, I noticed this: image

I.e: the stylesheet is this url:

https://chat.google.com/_/scs/mss-static/_/ss/k=boq-dynamite.DynamiteWebUi.6IMRoEhFLis.L.B1.O/am=escjAKhDsSE87bEAQAgI1YEMsQgFywcDmoFRjCapCA/d=1/ed=1/rs=AKbVGRKnUgMcuBCiVYofXPuxoLMdaHpk3A/m=worldmoleview,_b,_tp,byfTOb,lsjVmc,LEikZe,n73qwf,UUJqVe,MpJwZc

It seems to me that the stylesheet is being pulled from this url rather than served in to the page source itself. Do I understand this correctly? If so, is there a way for Stylus to circumvent this?

Screenshots

-

System Information

faulknermano commented 3 months ago

And yet, when I use Dark Reader's font override, Chat font is overridden, so I guess it must be technically possible, but can Stylus currently do it?

tophf commented 3 months ago

You can use devtools to inspect the URL of the frame that contains this element, it's not mail https://mail.google.com/chat but https://chat.google.com/u/0/frame, so your url-prefix should be fixed accordingly.