5 ms·
> We’ve added a User Agent override for Slack.com, which allows Firefox users to use more Call features and have access to Huddles. So now `window.navigator.ve
by frankjr 5y ago
> We’ve added a User Agent override for Slack.com, which allows Firefox users to use more Call features and have access to Huddles.
So now `window.navigator.vendor` returns "Google Inc." if your URL matches `://app.slack.com/`. LOL.
https://github.com/mozilla/gecko-dev/blob/eea0fac2cb8cae1e5a2e38959eeaa0b7f6d23456/browser/extensions/webcompat/injections/js/bug1727100-slack.com-ua-override.js https://github.com/mozilla/gecko-dev/blob/eea0fac2cb8cae1e5a...
- perihelions 5y agoThere's a list of UA overrides and other hardcoded website patches in about:compat.
- NelsonMinar 5y agoWow, what a collection of hacks. It reminds me of the efforts Microsoft goes to so that old programs keep working on Windows.
- TimTheTinker 5y agoI think in both cases it was less hack and more getting around browser sniffing code that makes outdated or incorrect assumptions. Please don't browser-sniff, use feature detection instead. The web platform is standards-driven, not browser-driven -- let's keep it that way :)
- NelsonMinar 5y agoI'm sympathetic to the need to do this, just admiring the kludges. It's not just user agent spoofing; some of the compatibility hacks seem to be modifying CSS of websites.
- Osiris 5y agoOpera 12, with the Presto engine, had this same problem. It had a huge list of overrides (JavaScript and CSS) to fix problems with popular websites. This is inevitable when a browser has limited market share.
- nonameiguess 5y agoThe things you learn. The damn CDC Covid tracker won't open in Firefox. It feels like not following open standards for cross compatibility is a dereliction of duty for government agencies, let alone the official tracking app during a pandemic.
- Nextgrid 5y agoI wonder why they bother with user-agents in the first place. It's more of a fingerprinting vector than anything else, especially considering Firefox's browser marketshare. Just hardcode it to Chrome's once and for all.
- streptomycin 5y agoSometimes browsers have bugs that cannot be identified with feature detection, in which case the user agent is all we have to know when to work around those bugs.
- foxrider 5y agoI feel like with the modern rate of browser development by the time you have identified and fixed the bug the fix may no longer be relevant
- tomxor 5y agoThis^ I like Firefox, but it's the only browser to blindly follow the questionable and backwards incompatible parts of the SVG-2 spec... I challenge anyone to identify that SVG-2 <use> is implemented instead of SVG-1 <use> without parsing the useragent string. The former is backwards incompatible (implemented in Firefox) and will render some nice black shapes if you've previously relied upon target context CSS rules for inheritance that have been supported by SVG-1 for the last decade. AFAIK you can only see this in the output since the inside of the <use> element is a shadow DOM inaccessible to JavaScript, so you cannot determine computed styles. For this reason I wrote an "unpolyfill" [0] that implements some of SVG-1 <use> elements with mutation-observers in JS, albeit in a not 100% correct way. Even so, it still needs to be explicitly enabled, depending one something else to parse the useragent string. We enjoy far more consistency than a decade ago, but browsers are incredibly complex, and there will no doubt continue to be obscure differences that are difficult or impossible to detect programmatically. Rendering differences most of all. [0] https://github.com/ThomasBrierley/svg2use-unpolyfill https://github.com/ThomasBrierley/svg2use-unpolyfill
- RF_Savage 5y agoHeh, user-agents have been like that since the start. Almost all modern browsers start their user-agent with "Mozilla/", so we are back to the beginning in that regard. And naturally it is for the same reasons too!
- kingcharles 5y agoYou can't make this shit up O_O
- stavros 5y agoWhat's so unbelievable about faking something to get an app that works perfectly fine on your browser to stop refusing to work on your browser?
- prohobo 5y agoI think he's talking about the fact that they had to do that at all.
- werdnapk 5y agoBlame slack.
- kingcharles 5y agoThis.
- stavros 5y agoIn that case, what's unbelievable about a developer phoning feature detection in and just using the user-agent string? :P
- sp332 5y agoIs it possible to detect the format of the webrtc video? That sounds difficult anyway.
- deleted 5y ago[deleted]
- alophawen 5y agoGeneral juniority of the HN crowd.
- shmerl 5y agoSlack is very nasty in how they refused to support proper WebRTC.
- solarkraft 5y agoKind of interesting that they don't even mention talking to Slack about just removing the check ... https://bugzilla.mozilla.org/show_bug.cgi?id=1727100 https://bugzilla.mozilla.org/show_bug.cgi?id=1727100
- usrlocal1023 5y agoThey tried but Slack weren't interested. Update from 2 years ago To summarize my current understanding: Slack's video conferencing service only support Chrome's non-standard Plan B format for WebRTC calls. And our attempts to talk to Slack about changing that were kindly rejected (we met with them shortly after they had launched the calling feature). And my repeated questions in public events about adding Firefox support were also turned down. Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c4 https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c4 Further clarification from last year https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c10 https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c10 I have seen people mention that they have tried few more times to contact them, but Slack weren't interested. My understanding as to why it works now, correct me if I am wrong, is because of Slack moving to using AWS Chime SDK for calls which has Firefox support and just faking the UA to Chrome tricks Slack into loads the necessary SDK/JS for calls and Chime SDK takes care of the rest.
- shmerl 5y agoSuch kind of attitude from Slack is disgusting.
- splatzone 5y agoI'm very confused - if it's working on Firefox with the Chime SDK, what good reason is there for Slack to block the feature on Firefox? Is there some political reason for them to disadvantage Firefox that I'm not aware of?
- usrlocal1023 5y agoWhen Slack launched video calls, it was using Chrome's own implementation of WebRTC which is called Plan B. So it worked in both their app which is electron based and Chrome. Not sure if it worked with chromium derivatives like Brave, Vivaldi, etc. Firefox rolled out the standard based WebRTC implementation and chrome eventually did as well, but companies like Slack and various others didn't migrate instead just threw an error message saying calling isn't supported in Firefox and instead use their app or chrome. Since Slack's partnership with AWS about 2 years ago, they migrated from their own call infrastructure to using AWS's Chime. Chime SDK has support for all major browsers https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.html#mtg-browsers https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.htm... But their browser check still remains today and Mozilla started to spoof the user agent as a workaround so that Firefox users can make calls as Slack aren't willing to remove the check or properly add support. Chrome is planning to remove WebRTC plan B soon, so this should force companies to use the unified WebRTC implementation and hopefully means Firefox support. https://groups.google.com/a/chromium.org/g/blink-dev/c/IY2amIigFFs https://groups.google.com/a/chromium.org/g/blink-dev/c/IY2am...
- jonathankoren 5y agoThe big wheel of `User-Agent: Mozilla` has finally turned.
- smnrchrds 5y agoQuirks Mode 2.0
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]