您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
微密圈快速分享【强制分享】
当前为
// ==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/[email protected]/dist/ajaxhook.min.js // @grant none // @license MIT // ==/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<Action_ItemClass_Count;Index++) { var DataEventNum_Ban = "30"; var DataEventNum_Share = "5"; var CurrentButton_Type = Action_ItemClass[Index].getAttribute("data-event"); if(CurrentButton_Type==DataEventNum_Ban) { Action_ItemClass[Index].setAttribute("data-event","5"); Action_ItemClass[Index].textContent="获取分享链接"; } } } function CloseShareWindowAndGetShareLink(ShareLinkText)//关闭分享成功弹窗,并获取短链内容 { var CloseButton = document.getElementById("btn-close"); if(CloseButton!=undefined) { CloseButton.click() var SearchBox = document.evaluate('/html/body/nav/div/div[1]/form/input',document).iterateNext(); SearchBox.value = ShareLinkText;//将短链移入到搜索框中 SearchBox.select(); document.execCommand('copy'); var PostInputBox = document.evaluate('/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/textarea',document).iterateNext(); PostInputBox.value = "链接已复制到剪贴板中,请直接在软件中粘贴!"; } } LoadingDebugInfo() GetFullCommunityPost()