Greasy Fork

Greasy Fork is available in English.

zhihu 知乎、知乎专栏 gif 自动加载

try to take over the world!

当前为 2020-01-09 提交的版本,查看 最新版本

// ==UserScript==
// @name         zhihu 知乎、知乎专栏 gif 自动加载
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://zhuanlan.zhihu.com/*
// @match        https://www.zhihu.com/*
// @grant        none
// ==/UserScript==

    // Your code here...
    (function () {
    'use strict';
    // Your code here...
    var players = document.querySelectorAll(".GifPlayer");
    players.forEach(function(item){
        item.classList.add("isPlaying");
    })
    var gifDoms = document.querySelectorAll(".ztext-gif");
    gifDoms.forEach(function(item){
        item.src = item.src.replace(/jpg$/g,"webp");
    })
})();