Zhihu archive

Automatically archive zhihu page 众所周知,知乎内容经常被小管家咔擦。安装本脚本后,访问知乎内容时会自动向 https://web.archive.org/ 申请存档对应的 www.fxzhihu.com 页面

当前为 2024-12-07 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Zhihu archive
// @namespace    http://www.zhihu.com/
// @version      0.4
// @description  Automatically archive zhihu page 众所周知,知乎内容经常被小管家咔擦。安装本脚本后,访问知乎内容时会自动向 https://web.archive.org/ 申请存档对应的 www.fxzhihu.com 页面
// @author       Jinzhe Zeng
// @match        https://www.zhihu.com/question/*
// @match        https://www.zhihu.com/question/*/answer/*
// @match        https://zhuanlan.zhihu.com/p/*
// @grant       GM_xmlhttpRequest
// @connect     web.archive.org
// @license LGPL-3.0-or-later; https://www.gnu.org/licenses/lgpl-3.0.txt
// ==/UserScript==

(function() {
    'use strict';

    var url = window.location.href.replace('zhihu.com', 'fxzhihu.com');
    GM_xmlhttpRequest ( {
    method:     'GET',
    url:        'https://web.archive.org/save/'+url,
    onload:     function (responseDetails) {
        console.log (
            "Save " + url + " successfully:\n",
            "See https://web.archive.org/web/*/"+url
        );
    }
} );
})();