// ==UserScript== // @name WeMeStrongShare // @namespace http://tampermonkey.net/ // @version 1.0 // @description 微密圈快速分享【强制分享】 // @author PWNINT32 // @match http://web.weme.link/Community/Index // @icon https://www.google.com/s2/favicons?domain=weme.link // @require https://unpkg.com/ajax-hook@2.0.3/dist/ajaxhook.min.js // @grant none // @license MIT // @downloadURL none // ==/UserScript== function LoadingDebugInfo()//加载调试信息 { console.warn("[*] 调试信息:脚本加载成功..."); console.warn("[*] --------------------------"); console.warn("[*] 欢迎使用本脚本:1.本脚本需要搭配工具使用,用于解析付费\VIP帖子\n 2.欢迎加入讨论圈:8390463,每日更新图包"); console.warn("[*] --------------------------"); } function GetFullCommunityPost()//更改请求参数获取单个用户全部帖子链接 { ah.proxy({ onRequest: (config, handler) => { var SetPageCount = "PageSize=9999";//默认调整为9999 if(config.url.includes("PageSize")) { config.url = config.url.replace("PageSize=10",SetPageCount);//将请求Url进行更改以显示全部的动态 console.warn("[*] 更改显示条数参数成功,目前显示全部动态,加载时间较长,请等待...."); } handler.next(config);//固定写法 }, onError: (err, handler) => { handler.next(err) }, onResponse: (response, handler) => { handler.next(response) Change2ShareButton();//等待网页响应完毕后再进行调用 if(response.config.url.includes("ShareArticle")) { var ShortLink = JSON.parse(response.response)["data"]["WxUrl"];//获取分享短链 CloseShareWindowAndGetShareLink(ShortLink); console.log("[*] 短链获取成功,内容为"+ShortLink); } } }) } function Change2ShareButton() { var Action_ItemClass = document.getElementsByClassName("action-item"); var Action_ItemClass_Count = Action_ItemClass.length; for(var Index=0;Index