Firefox 终于要支持 WebP 了 by ivysrono

View this thread on steempeak.com
· @ivysrono ·
$0.45
Firefox 终于要支持 WebP 了
[Firefox to support Google's WebP image format for a faster web - CNET](https://www.cnet.com/news/firefox-to-support-googles-webp-image-format-for-a-faster-web/)

桌面版还好说,只用 WebP 的页面很少,手机版就麻烦了,移动版 Chrome 一家独大,Firefox for Android 的占有率太低,被忽视是理所当然的事情。
前段时间我就发现美篇——就是引发鸿毛药酒事件的那篇小文的首发地——就默认使用 WebP 图片格式,在 Android 上只有 Firefox 无法浏览。当时排查了很久才发现是这个坑爹的问题……

最后没办法,写了段[脚本](https://github.com/ivysrono/Scripts/blob/master/Better-mobile-web.user.js#L105):

```
// 美篇 https://www.meipian.cn/1m3oighe?share_depth=3&from=timeline
if (location.host === 'www.meipian.cn') {
  // 清理 URL
  if (location.search.length > 0) {
    location.search = '';
  }
  // 隐藏文末打开APP条;隐藏部分推荐条目的APP打开;隐藏移动版底部APP推广
  addStyle('.more, .recommend-label.label-download, #bottom-header-box {display: none !important;}');
  // 显示真实图片,主要解决移动版 Firefox 无法显示 WebP 的问题。
  function realimgs_meipian() {
    const imgs = document.getElementsByTagName('img')
    for (const img of imgs) {
      if (img.src.includes('-mobile')) {
        img.src = img.src.split('-mobile')[0];
        clearInterval(realimgs_MP);
        console.log('realimgs_MP')
      }
    }
  }
  realimgs_MP = setInterval(realimgs_meipian, 1000);
  // 自动显示全文
  function readmore_meipian() {
    if (document.getElementsByClassName('readmore')[0].style.display === 'block') {
      document.getElementsByClassName('readmore')[0].click();
      clearInterval(readmore_MP);
      console.log('readmore_MP')
    }
  }
  readmore_MP = setInterval(readmore_meipian, 1000);
}
```

暴力将所有图片改为原图——反正这年头流量不值钱。

今后终于可以轻松点了。
👍  , , , , , , , , , , , , , , ,
properties (23)
post_id63,811,936
authorivysrono
permlinkfirefox-webp
categorycn
json_metadata{"users":[],"format":"markdown","image":[],"links":["https:\/\/www.cnet.com\/news\/firefox-to-support-googles-webp-image-format-for-a-faster-web\/","https:\/\/github.com\/ivysrono\/Scripts\/blob\/master\/Better-mobile-web.user.js#L105"],"tags":["cn","firefox","webp","busy","edge"],"app":"busy\/2.5.6","community":"busy"}
created2018-10-07 12:59:51
last_update2018-10-07 12:59:51
depth0
children4
net_rshares299,026,522,544
last_payout2018-10-14 12:59:51
cashout_time1969-12-31 23:59:59
total_payout_value0.344 SBD
curator_payout_value0.106 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,531
author_reputation4,265,795,188,015
root_title"Firefox 终于要支持 WebP 了"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (16)
@xinjun.wang ·
以前一直用Firefox,后来一直用Chrome....
properties (22)
post_id63,814,307
authorxinjun.wang
permlinkre-ivysrono-firefox-webp-20181007t134719773z
categorycn
json_metadata{"tags":["cn"],"app":"steemit\/0.1"}
created2018-10-07 13:47:21
last_update2018-10-07 13:47:21
depth1
children2
net_rshares0
last_payout2018-10-14 13:47:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length28
author_reputation0
root_title"Firefox 终于要支持 WebP 了"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars0
@ivysrono ·
$0.05
chrome太弱了,Google又没事耍流氓
👍  
properties (23)
post_id63,817,205
authorivysrono
permlinkre-xinjunwang-re-ivysrono-firefox-webp-20181007t143850576z
categorycn
json_metadata{"users":[],"links":[],"format":"markdown","app":"busy\/2.5.6","tags":["cn"],"image":[],"community":"busy"}
created2018-10-07 14:38:54
last_update2018-10-07 14:38:54
depth2
children1
net_rshares30,600,096,722
last_payout2018-10-14 14:38:54
cashout_time1969-12-31 23:59:59
total_payout_value0.034 SBD
curator_payout_value0.011 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length22
author_reputation4,265,795,188,015
root_title"Firefox 终于要支持 WebP 了"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@xinjun.wang ·
有段时间觉得Firefox用起来变慢了,所以我就转向了Chrome
properties (22)
post_id63,852,416
authorxinjun.wang
permlinkre-ivysrono-re-xinjunwang-re-ivysrono-firefox-webp-20181008t051349765z
categorycn
json_metadata{"app":"steemit\/0.1","tags":["cn"]}
created2018-10-08 05:13:51
last_update2018-10-08 05:13:51
depth3
children0
net_rshares0
last_payout2018-10-15 05:13:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length33
author_reputation0
root_title"Firefox 终于要支持 WebP 了"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars0
@cnbuddy ·
帅哥/美女!请支持中文区的见证人, @abit @bobdos @ety001 @justyy @oflyhigh @partiko (首字母顺序),全投,一个都不要漏。假如我的留言打扰到你,请回复“取消”。
properties (22)
post_id63,833,539
authorcnbuddy
permlinkre-ivysrono-firefox-webp-20181007t203514861z
categorycn
json_metadata{}
created2018-10-07 20:35:15
last_update2018-10-07 20:35:15
depth1
children0
net_rshares0
last_payout2018-10-14 20:35:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length104
author_reputation-1,405,328,253,928
root_title"Firefox 终于要支持 WebP 了"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000