### Project Development and Build Commands Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/CLAUDE.md Standard commands for managing dependencies, running the development server, building for production, and formatting code. ```bash # 安装依赖(要求 Node >= 22,yarn 1.22.22 通过 corepack 管理) corepack enable && corepack prepare yarn@1.22.22 --activate yarn # 开发 yarn dev # 启动开发服务器 # 构建与部署 yarn build # 生产构建(输出到 .output/) yarn preview # 构建 Cloudflare Pages 版本并本地预览 # 代码格式化(Biome 为主要格式化工具,linter 已禁用) yarn format # biome check --write # Docker yarn docker:build yarn docker:publish ``` -------------------------------- ### Initialize IP Location and Module Loading Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/aboutbiz/biz-MzI0Nzg2MTExMA==.html Sets the global IP location information and triggers the loading of the verification module. ```javascript window.ip_wording = { countryName: '中国', countryId: '156', provinceName: '广东', provinceId: '', cityName: '', cityId: '' }; seajs.use('wxverify/info.js'); ``` -------------------------------- ### Initialize WeChat Article Environment Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/02.html Parses URL parameters and detects the operating system or browser environment to apply specific CSS classes to the document body. ```javascript } if (params['pass_ticket']) { params['pass_ticket'] = encodeURIComponent(params['pass_ticket'].html(false).html(false).replace(/\s/g, "+")); } return params; }; (function () { var params = getQueryFromURL(location.href); window.uin = params['uin'] || "" || ''; window.key = params['key'] || "" || ''; window.wxtoken = params['wxtoken'] || ''; window.pass_ticket = params['pass_ticket'] || ''; window.appmsg_token = "" || ""; var ua = navigator.userAgent; var isWin = ua.match(/Windows(\s+\w+)?\s+?(\d+\.\d+)/); if ( ua.match(/Mac\sOS\sX\s(\d+[\.|_]\d+)/) || isWin || ua.match(/Linux\s/) || ua.match(/UnifiedPC/) || (ua.match(/OpenHarmony/i) && ua.match(/pc/i)) ) { document.body.classList.add('pages_skin_pc'); if (isWin) { document.body.classList.add('pages_skin_windows'); } } if (/MPAPP\/([\d\.]+)/i.test(ua)) { document.body.classList.add('pages_skin_mpapp'); } if (params['uninteractive']) { document.body.classList.add('pages_skin_browser_underline'); } })(); window.__ajaxTransferConfig = {}; ``` -------------------------------- ### Import Vite Legacy Entry Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/内容违规/01.html Imports the main application entry point using SystemJS. ```javascript System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src')) ``` -------------------------------- ### Legacy Module Support and Vite Entry Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/02.html Detects support for ES modules and loads the application entry point via SystemJS. ```javascript !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}(); System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src')) ``` -------------------------------- ### 克隆仓库 Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/CONTRIBUTING.md 获取项目源码的初始步骤。 ```shell git clone git@github.com:wechat-article/wechat-article-exporter.git ``` -------------------------------- ### Environment and Platform Initialization Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/06.html Self-invoking function that detects the operating system and browser environment to apply specific CSS classes to the document body. ```javascript (function () { var params = getQueryFromURL(location.href); window.uin = params['uin'] || "" || ''; window.key = params['key'] || "" || ''; window.wxtoken = params['wxtoken'] || ''; window.pass_ticket = params['pass_ticket'] || ''; window.appmsg_token = "" || ""; var ua = navigator.userAgent; var isWin = ua.match(/Windows(\s+\w+)?\s+?(\d+\.\d+)/); if ( ua.match(/Mac\sOS\sX\s(\d+[\.|_]\d+)/) || isWin || ua.match(/Linux\s/) || ua.match(/UnifiedPC/) || (ua.match(/OpenHarmony/i) && ua.match(/pc/i)) ) { document.body.classList.add('pages_skin_pc'); if (isWin) { document.body.classList.add('pages_skin_windows'); } } if (/MPAPP/([\d\.]+)/i.test(ua)) { document.body.classList.add('pages_skin_mpapp'); } if (params['uninteractive']) { document.body.classList.add('pages_skin_browser_underline'); } })(); window.__ajaxTransferConfig = {}; ``` -------------------------------- ### Initialize WeChat Business Configuration Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/aboutbiz/biz-MjM5OTM0OTE1Mg==.html Defines the global resource mapping, performance tracking, and authorization data for third-party applications. ```javascript {"auth-half-dialog/auth-card.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-card.html7a271b.js","biz_wap/utils/ajax_wx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_wx7a271b.js","biz_common/utils/respTypes.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/respTypes7a271b.js","biz_common/utils/url/parse.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse7a271b.js","biz_common/utils/string/html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html7a271b.js","auth-half-dialog/auth-card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-card7a271b.js","auth-half-dialog/auth-half-dialog.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-half-dialog.html7a271b.js","biz_wap/utils/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/log7a271b.js","biz_wap/utils/ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax7a271b.js","biz_common/utils/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/monitor7a271b.js","common/color/dark.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/dark7a271b.js","common/color/light.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/light7a271b.js","biz_wap/utils/mmversion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion7a271b.js","biz_wap/jsapi/mpapp_core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/mpapp_core7a271b.js","auth-half-dialog/auth-half-dialog.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-half-dialog7a271b.js","biz_wap/utils/jsmonitor_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/jsmonitor_report7a271b.js","common/color/background_color.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/background_color7a271b.js","biz_wap/jsapi/core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core7a271b.js","pages_new/3rd/vue.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/3rd/vue7a271b.js","wxverify/info.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/wxverify/info7a271b.js"};window.__wxgspeeds={}; window.__wxgspeeds.moonloadtime=+new Date() var cgiData = { auth_3rd_list: [] }; window.cgiData.auth_3rd_list.push({ principal: '电子卡券', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_oRPaqjnX_sUpjvs9-TjP6p1VRaQQ&from=profile&fromAppId=wx6173eb6085accfec&componentAppId=wx6803d7ca3db40a68', category: [ { id: '4' * 1, name: '网页服务', desc: '基于该权限可帮助公众实现H5网页服务', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, { id: '8' * 1, name: '微信卡券', desc: '基于该权限可帮助公众号使用微信卡券功能', }, { id: '26' * 1, name: '微信电子发票', desc: '基于该权限可帮助公众号使用微信电子发票功能', }, ], }); window.cgiData.auth_3rd_list.push({ principal: '必胜客排队PROD', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_oyKJ5t3j_-QLUPEbWH0MTgLirzrs&from=profile&fromAppId=wx6173eb6085accfec&componentAppId=wxa33f461c3ebdc6a4', category: [ { id: '2' * 1, name: '用户管理', desc: '帮助公众号获取用户信息,进行用户管理', }, { id: '3' * 1, name: '公众号账号信息服务', desc: '基于该权限可帮助公众号设置及展示公众号信息、配置账号信息、生成带参二维码并配置跳转小程序等账号维度的功能', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, ], }); window.cgiData.auth_3rd_list.push({ principal: '网易七鱼-百胜客服', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_o5Cdf1Xs-S6a788peMLJ7aZ8yx8U&from=profile&fromAppId=wx6173eb6085accfec&componentAppId=wx6fbcc057d787691f', category: [ { id: '1' * 1, name: '消息管理', desc: '基于该权限可帮助公众号接收用户消息,进行人工客服回复或自动回复', }, { id: '2' * 1, name: '用户管理', desc: '帮助公众号获取用户信息,进行用户管理', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, ], }); window.ip_wording = { countryName: '中国', countryId: '156', provinceName: '上海', provinceId: '', cityName: '', cityId: '' }; seajs.use('wxverify/info.js'); ``` -------------------------------- ### 本地运行项目 Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/CONTRIBUTING.md 启动开发环境。 ```shell yarn dev ``` -------------------------------- ### 安装项目依赖 Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/CONTRIBUTING.md 使用corepack启用yarn并安装项目依赖。 ```shell corepack enable corepack prepare yarn@1.22.22 --activate yarn ``` -------------------------------- ### Initialize WeChat Business Data and Authorization Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/aboutbiz/biz-MzI4NjAxNjY4Nw==.html Initializes the global configuration object and populates the third-party authorization list with principal and category details. ```javascript {"auth-half-dialog/auth-card.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-card.html7a271b.js","biz_wap/utils/ajax_wx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_wx7a271b.js","biz_common/utils/respTypes.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/respTypes7a271b.js","biz_common/utils/url/parse.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse7a271b.js","biz_common/utils/string/html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html7a271b.js","auth-half-dialog/auth-card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-card7a271b.js","auth-half-dialog/auth-half-dialog.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-half-dialog.html7a271b.js","biz_wap/utils/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/log7a271b.js","biz_wap/utils/ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax7a271b.js","biz_common/utils/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/monitor7a271b.js","common/color/dark.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/dark7a271b.js","common/color/light.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/light7a271b.js","biz_wap/utils/mmversion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion7a271b.js","biz_wap/jsapi/mpapp_core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/mpapp_core7a271b.js","auth-half-dialog/auth-half-dialog.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/auth-half-dialog/auth-half-dialog7a271b.js","biz_wap/utils/jsmonitor_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/jsmonitor_report7a271b.js","common/color/background_color.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/background_color7a271b.js","biz_wap/jsapi/core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core7a271b.js","pages_new/3rd/vue.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/3rd/vue7a271b.js","wxverify/info.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/wxverify/info7a271b.js"};window.__wxgspeeds={}; window.__wxgspeeds.moonloadtime=+new Date() var cgiData = { auth_3rd_list: [] }; window.cgiData.auth_3rd_list.push({ principal: '头条号', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_on9Pn0Tq8TPXK0gY4LOH62VlANM0&from=profile&fromAppId=wx43df291a3ba7931f&componentAppId=wxc172674a3d857d1b', category: [ { id: '3' * 1, name: '公众号账号信息服务', desc: '基于该权限可帮助公众号设置及展示公众号信息、配置账号信息、生成带参二维码并配置跳转小程序等账号维度的功能', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, { id: '24' * 1, name: '开放平台账号管理', desc: '基于该权限可帮助公众号实现绑定开放平台账号功能', }, ], }); window.cgiData.auth_3rd_list.push({ principal: '新榜', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_o4emptyC1_1sG031GTYTvSVWKdoQ&from=profile&fromAppId=wx43df291a3ba7931f&componentAppId=wxc67c8905b1d56d24', category: [ { id: '2' * 1, name: '用户管理', desc: '帮助公众号获取用户信息,进行用户管理', }, { id: '3' * 1, name: '公众号账号信息服务', desc: '基于该权限可帮助公众号设置及展示公众号信息、配置账号信息、生成带参二维码并配置跳转小程序等账号维度的功能', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, { id: '15' * 1, name: '自定义菜单管理', desc: '帮助公众号使用自定义菜单', }, ], }); window.ip_wording = { countryName: '中国', countryId: '156', provinceName: '云南', provinceId: '', cityName: '', cityId: '' }; seajs.use('wxverify/info.js'); ``` -------------------------------- ### Initialize WeChat BadJS Error Reporting Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/01.html Sets up the global error reporting environment and hooks into window events to capture unhandled exceptions. ```javascript try{document.getElementsByTagName('html').item(0).style.webkitTextSizeAdjust=JSON.parse(window.__wxWebEnv.getEnv()).fontScale+'%'}catch(e){} window.logs = { pagetime: {} }; window.logs.pagetime['html_begin'] = (+new Date()); window.LANG = "zh_CN"; var WX_BJ_REPORT = window.WX_BJ_REPORT || {}; (function(_) { if (_.BadJs) { return; } var BADJS_WIN_ERR = 'BadjsWindowError'; var extend = function(source, destination) { for (var property in destination) { source[property] = destination[property] } return source } _.BadJs = { uin: 0, mid: "", view: "wap", _cache: {}, _info: {}, _hookCallback: null, ignorePath: true, throw: function(e, extData) { this.onError(e, extData); throw e; }, onError: function(e, extData) { try { if (e.BADJS_EXCUTED == true) { return; } e.BADJS_EXCUTED = true; var data = errToData(e); data.uin = this.uin; data.mid = this.mid; data.view = this.view; data.cmdb_module = 'mmbizwap'; if (!!extData) { data = extend(data, extData); } if (data.cid) { data.key = "[" + data.cid + "]:" + data.key; } if (data.key.includes('Failed to fetch dynamically imported module')) { data.key = 'Failed to fetch dynamically imported module'; } if (window.biz) { data.msg += ` || https://mp.weixin.qq.com/s?__biz=${window.biz}&mid=${window.mid}&idx=${window.idx}&sn=${window.sn}&scene=${window.source} || sec_open=${!!window.__second_open__}`; } if (data._info) { if (Object.prototype.toString.call(data._info) == "[object Object]") { data.msg += " || info:" + JSON.stringify(data._info); } else if (Object.prototype.toString.call(data._info) == "[object String]") { data.msg += " || info:" + data._info; } else { data.msg += " || info:" + data._info; } } if (typeof this._hookCallback == "function") { if (this._hookCallback(data) === false) { return } } this._send(data); return _.BadJs; } catch (e) { console.error(e); } }, winErr: function(event) { if (event.error && event.error.BADJS_EXCUTED) { return; } if (event.type === 'unhandledrejection') { if (event.reason instanceof Error) { var e = event.reason || {}; _.BadJs.onError(createError(event.type, e.message || "", e.sourceURL || "", e.line || "", e.column || "", event.reason)); } else { var message = typeof event.reason === 'object' ? JSON.stringify(event.reason) : event.reason; _.BadJs.onError(createError(event.type, message, "", "", "", event.reason)); } }else{ _.BadJs.onError(createError(BADJS_WIN_ERR, event.message, event.filename, event.lineno, event.colno, event.error)); } }, init: function(uin, mid, view) { this.uin = uin || this.uin; this.mid = mid || this.mid; this.view = view || this.view; return _.BadJs; }, hook: function(fn) { this._hookCallback = fn; return _.BadJs; }, _send: function(data) { if (!data.mid) { if (typeof window.PAGE_MID !== 'undefined' && window.PAGE_MID) { data.mid = window.PAGE_MID; } else { return; } } if (!data.uin) { data.uin = window.user_uin || 0; } var flag = [data.mid, data.name, data.key].join("|"); if (this._cache && this._cache[flag]) { return } else { this._cache && (this._cache[flag] = true); this._xhr(data); } return _.BadJs; }, _xhr: function(data) { var xmlobj; if (window.ActiveXObject) { try { xmlobj = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlobj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlobj = false; } } } else if (window.XMLHttpRequest) { xmlobj = new XMLHttpRequest(); } var param = ""; for (var key in data) { if (key && data[key]) { param += [key, "=", encodeURIComponent(data[key]), "&"].join(""); } } if (xmlobj && typeof xmlobj.open == "function") { xmlobj.open("POST", "https://badjs.weixinbridge.com/report", true); xmlobj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlobj.onreadystatechange = function(status) {}; xmlobj.send(param.slice(0, -1)); } else { var img = new Image(); img.src = "https://badjs.weixinbridge.com/report?" + param; } }, report: function(name, key, data) { this.onError(createError(name, key), data); return this; }, mark: function(info) { this._info = extend(this._info, info); }, nocache: function() { this._cache = false; return _.BadJs; } } function createError(name, msg, url, line, col, error) { return { name: name || "", message: msg || "", file: url || "", line: line || "", col: col || "", stack: (error && error.stack) || "", } } function errToData(e) { var _stack = parseStack(e); return { name: e.name, key: e.message, msg: e.message, stack: _stack.info, file: _stack.file, line: _stack.line, col: _stack.col, client_version: "", _info: e._info } } function parseStack(e) { e._info = e._info || ""; var stack = e.stack || ""; var _stack = { info: stack, file: e.file || "", line: e.line || "", col: e.col || "", }; if (_stack.file == "") { var stackArr = stack.split(/\bat\b/); if (stackArr && stackArr[1]) { var match = /(https?:\/\/[^\n]+)\:(\d+)\:(\d+)/.exec(stackArr[1]); if (match) { if (match[1] && ``` -------------------------------- ### String Replacement and URL Parameter Parsing Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/06.html Utility functions for HTML entity replacement and extracting query parameters from a URL string. ```javascript """, "'", "'"]; var target; if (encode) { target = replaceReverse; } else { target = replace; } for (var i = 0, str = this; i < target.length; i += 2) { str = str.replace(new RegExp(target[i], 'g'), target[i + 1]); } return str; }; window.isInWeixinApp = function () { return /MicroMessenger/.test(navigator.userAgent); }; window.getQueryFromURL = function (url) { url = url || 'http://qq.com/s?a=b#rd'; var tmp = url.split('?'), query = (tmp[1] || "").split('#')[0].split('&'), params = {}; for (var i = 0; i < query.length; i++) { var arg = query[i].split('='); params[arg[0]] = arg[1]; } if (params['pass_ticket']) { params['pass_ticket'] = encodeURIComponent(params['pass_ticket'].html(false).html(false).replace(/\s/g, "+")); } return params; }; ``` -------------------------------- ### Legacy Module Support Detection Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/内容违规/01.html Detects if the browser supports ES modules and handles legacy script loading. ```javascript !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}(); ``` -------------------------------- ### Load Debugging Scripts Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/02.html Dynamically loads VConsole or remote debugging scripts based on cookie or URL parameters. ```javascript (function () { var totalCount = 0, finishCount = 0; function _addScript(uri, cb) { totalCount++; var node = document.createElement('SCRIPT'); node.type = 'text/javascript'; node.src = uri; node.setAttribute('nonce', ''); if (cb) { node.onload = cb; } document.getElementsByTagName('head')[0].appendChild(node); } if ((document.cookie && document.cookie.indexOf('vconsole_open=1') > -1) || location.href.indexOf('vconsole=1') > -1) { _addScript('https://mp.weixin.qq.com/mmbizappmsg/zh_CN/htmledition/js/scripts/vconsole-3.14.6.js', function () { window.vConsole = new window.VConsole(); }); } if (document.cookie && document.cookie.indexOf('__xweb_remote_debug_device_token__') > -1) { _addScript('https://mp.weixin.qq.com/mmbizappmsg/zh_CN/htmledition/js/scripts/mprdev-0.3.0.js', function () { _addScript('https://mp.weixin.qq.com/mmbizappmsg/zh_CN/htmledition/js/scripts/xwebrd-0.0.2.js'); }); } })(); ``` -------------------------------- ### Prefetch Ad Iframe Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/作者已删除/02.html Prefetches an ad iframe URL stored in localStorage if the current window is the top-level window. ```javascript window.logs.pagetime.page_begin = Date.now(); try { var adIframeUrl = localStorage.getItem('__WXLS_ad_iframe_url'); if (window === top) { if (adIframeUrl) { if (navigator.userAgent.indexOf('iPhone') > -1) { var img = new Image(); img.src = adIframeUrl; } else { var link = document.createElement('link'); link.rel = 'prefetch'; link.href = adIframeUrl; document.getElementsByTagName('head')[0].appendChild(link); } } } } catch (err) { } ``` -------------------------------- ### Configure WeChat Third-Party Authorization Data Source: https://github.com/wechat-article/wechat-article-exporter/blob/master/samples/aboutbiz/biz-MzI0Nzg2MTExMA==.html Defines the structure for third-party service authorization, including principal details, app IDs, and category permissions. ```javascript '基于该权限可帮助公众号设置及展示公众号信息、配置账号信息、生成带参二维码并配置跳转小程序等账号维度的功能', }, { id: '4' * 1, name: '网页服务', desc: '基于该权限可帮助公众实现H5网页服务', }, { id: '6' * 1, name: '微信多客服', desc: '基于该权限可帮助公众号使用微信多客服功能', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, { id: '15' * 1, name: '自定义菜单管理', desc: '帮助公众号使用自定义菜单', }, ], }); window.cgiData.auth_3rd_list.push({ principal: '微号帮', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_oZJWMwS6_YRH17OWHnMoWH27NK2w&from=profile&fromAppId=wx46f58fe71e8848c4&componentAppId=wx344e5042cdf74d05', category: [ { id: '1' * 1, name: '消息管理', desc: '基于该权限可帮助公众号接收用户消息,进行人工客服回复或自动回复', }, { id: '2' * 1, name: '用户管理', desc: '帮助公众号获取用户信息,进行用户管理', }, { id: '3' * 1, name: '公众号账号信息服务', desc: '基于该权限可帮助公众号设置及展示公众号信息、配置账号信息、生成带参二维码并配置跳转小程序等账号维度的功能', }, { id: '4' * 1, name: '网页服务', desc: '基于该权限可帮助公众实现H5网页服务', }, { id: '5' * 1, name: '微信小店', desc: '基于该权限可帮助公众号使用微信小店功能', }, { id: '6' * 1, name: '微信多客服', desc: '基于该权限可帮助公众号使用微信多客服功能', }, { id: '7' * 1, name: '群发与通知', desc: '基于该权限可帮助公众号进行群发消息、文章管理以及发送模板消息', }, { id: '8' * 1, name: '微信卡券', desc: '基于该权限可帮助公众号使用微信卡券功能', }, { id: '9' * 1, name: '微信扫一扫', desc: '基于该权限可帮助公众号使用微信扫一扫功能', }, { id: '10' * 1, name: '微信连WIFI', desc: '基于该权限可帮助公众号使用微信连WIFI功能', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, { id: '12' * 1, name: '微信摇周边', desc: '基于该权限可帮助公众号使用微信摇周边功能', }, { id: '13' * 1, name: '微信门店', desc: '基于该权限可帮助公众号使用微信门店功能', }, { id: '15' * 1, name: '自定义菜单管理', desc: '帮助公众号使用自定义菜单', }, { id: '22' * 1, name: '城市服务', desc: '基于该权限可帮助公众号使用微信城市服务功能', }, { id: '27' * 1, name: '快速注册小程序', desc: '基于该权限可帮助公众号实现复用公众号资质快速注册小程序功能', }, { id: '33' * 1, name: '小程序关联管理', desc: '基于该权限可实现将小程序关联/解除关联公众号', }, { id: '35' * 1, name: '微信卡路里', desc: '基于该权限可帮助公众号提供用户卡路里同步、授权查询、兑换等功能', }, { id: '46' * 1, name: '微信一物一码', desc: '基于该权限可帮助公众号使用微信一物一码功能', }, { id: '66' * 1, name: '微信服务平台管理', desc: '基于该权限可代公众号调用在微信服务平台购买的API资源', }, { id: '89' * 1, name: '服务号订阅通知', desc: '基于该权限可帮助服务号使用订阅通知', }, ], }); window.cgiData.auth_3rd_list.push({ principal: '小红书长文助手', userName: 'gh_d483129a0f29@app', appId: 'wx19e904724550a41f', relativeURL: 'pages/profile/index?enterpriseOpenId=sq_oky2-t3eq3TCqMy3ZqJE_MEcTK18&from=profile&fromAppId=wx46f58fe71e8848c4&componentAppId=wx8e839179bd25198d', category: [ { id: '2' * 1, name: '用户管理', desc: '帮助公众号获取用户信息,进行用户管理', }, { id: '11' * 1, name: '素材管理', desc: '基于该权限可帮助公众号管理图文等多媒体素材以及多媒体文件管理', }, { id: '172' * 1, name: '消息推送调试工具', desc: '用于消息推送调试工具', }, ], }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.