Greasy Fork

Greasy Fork is available in English.

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

just for fun!

当前为 2020-08-05 提交的版本,查看 最新版本

// ==UserScript==
// @name         zhihu 知乎、知乎专栏 gif 自动加载
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  just for fun!
// @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");
    })
})();