Greasy Fork

Greasy Fork is available in English.

免费下载文档【应届毕业生网|文小蜜】

免费下载文档,取消微信关注公众号和付费下载的限制。

当前为 2022-06-11 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name            免费下载文档【应届毕业生网|文小蜜】
// @namespace       http://tampermonkey.net/
// @version         2.0
// @description     免费下载文档,取消微信关注公众号和付费下载的限制。
// @author          Conastin
// @match           *://*.yjbys.com/*
// @match           *://*.wenxm.cn/*
// @icon            https://cdn.icon-icons.com/icons2/1222/PNG/512/1492616984-7-docs-document-file-data-google-suits_83406.png
// @grant           unsafeWindow
// @require         https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js
// @require         https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js
// @license         MIT
// ==/UserScript==
var $ = unsafeWindow.jQuery;

(function () {
    'use strict';
    if (location.host == 'www.yjbys.com') {
        // 应届毕业生网
        var pageSize = 1;
        var pathname = location.href.replaceAll(location.host, '').replaceAll('https://', '');
        $(document).on('click', '.download_card_box', function () {
            location.href = "//" + location.host + "/pic/dldoc/page" + pageSize + pathname;
        });
    } else if (location.host == 'www.wenxm.cn') {
        // 文小蜜
        $('body').on('click', '.gf_xiazai', function () {
            wenxmDownload();
        });
    }
})();

// 文小蜜下载
function wenxmDownload() {
    var arcurl = location.href;
    //判断域名
    var domain = '';
    if (document.domain.indexOf(".com.cn") > -1) {
        domain = document.domain.split('.').slice(-3).join('.');
    }
    else {
        domain = document.domain.split('.').slice(-2).join('.');
    }
    if (arcurl.indexOf(document.domain) == -1) {
        if (arcurl.indexOf('https') > -1 || arcurl.indexOf('5068.com') > -1 || arcurl.indexOf('kuk8.com') > -1) {
            arcurl = arcurl.replace(/https:/g, '');
            arcurl = 'https://' + document.domain + arcurl;
        }
        else {
            arcurl = arcurl.replace(/http:/g, '');
            arcurl = 'http://' + document.domain + arcurl;
        }
    }
    $.ajax({
        url: '//lhpay.gzcl999.com/index.php/index/urldoc/doc',
        data: {
            "appid": 'gzcl2020042616833350688',
            "secret": "Wx20200603ZXFF5068xuedutuikjlpd",
            "domain": domain,
            "url": arcurl,
            "type": 2,
        },
        type: "POST",
        async: true,
        success: function (data) {
            console.log(data);
            if (data.code == 200) {
                location.href = data.path;
            }
        }
    });
}