On 8/21/15 4:31 PM, Hubert Figuière wrote:
Disclaimer: I wrote the Firefox add-on mentioned, and I filed the bug
mentioned as well. So my opinion is sorta made.
Yes, thank you! :)
On 21/08/15 06:17 PM, Chris Peterson wrote:
Does Gecko have a precedent for rewriting certain HTML patterns? YouTube
is migrating from Flash to HTML video, but many third-party websites
copied YouTube's old example code to embedded Flash videos. YouTube's
current embedding code automatically switches between Flash and HTML
video, but YouTube can't fix third-party websites still using the old
embedding code.
Bug 769117 discusses whether Gecko should detect YouTube's old embedding
boilerplate and automatically rewrite it to use the current code.
Firefox and Safari extensions [1] [2] already do this, but should Gecko
include this feature directly? It would improve users' video experience
and fix dead links if/when Firefox or YouTube stop supporting Flash.
OTOH, this is a site-specific workaround and thus might not belong in
Gecko itself.
It think that it is a feature that could be implemented in Firefox:
1. make it so that the rules are rewritable without updating the
browser, or at least touching the core. ESR comes to mind as a reason
why we'd love to update these.
2. make it cross platform. Mobile (including FirefoxOS) would completely
benefit from that. Case in point, Safari on iOS has been doing that for
a very long time.
Do you know what Safari is rewriting? I assume it's more than just Flash
videos.
3. don't make it specific to YouTube but specific to Flash. no-flash
supports Dailymotion (the French YouTube) and Vimeo (rarer since they
have done HTML5 embed for even longer). With 1. we can add rules easily.
As for the question if Gecko has a feature, maybe that's where we
implement it. I'm not sure if that's a feature to expose in the wild or
not but given that we can do it with add-ons, and there are a few
concrete use cases, we can possibly think of making this of general
usefulness.
Good point. It could be a general pattern-matching/rewriting API
available to add-ons. Regular expressions are part of the reason Adblock
Plus is slow. We could move that matching into native code.
chris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform