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My41NzggMTM5LjUxNiAxMjMuNDA3IDE0Ni4zMzQgMTEwLjUxMyBDIDE1Mi4zMzkgOTkuMTU3IDE2Ny4yNjAgODcuNTQzIDE3OC41NzAgODUuNDIxIEMgMTgwLjQ1NyA4NS4wNjcgMTgyLjAwMCA4NC4zNTEgMTgyLjAwMCA4My44MzAgQyAxODIuMDAwIDgzLjMwOCAxODIuMzYxIDgzLjEwNSAxODIuODAyIDgzLjM3OCBDIDE4My4yNDMgODMuNjUwIDE4Ni43MzAgODMuNDk0IDE5MC41NTIgODMuMDMwIEMgMTk4Ljk0NCA4Mi4wMTMgMjA5LjQwNiA4Mi42MjEgMjE3LjQzNCA4NC41OTQgIi8+PC9nPg0KPC9zdmc+DQo= // @description qk资源共享,csdn,文件下载,会员文章,超级会员,知乎,知乎盐选,专栏 // @author 佚名 // @match *://*.blog.csdn.net/* // @match *://*.zhihu.com/* // @match *://download.csdn.net/* // @connect qktk.online // @antifeature membership // @require https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js // @grant GM_addStyle // @grant unsafeWindow // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // ==/UserScript== var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); (function() { "use strict"; GM_addStyle(`@font-face { font-family: "qkkkk"; /* Project id 4739727 */ src: url('data:font/woff2;base64,d09GMgABAAAAAAPgAAsAAAAACBgAAAOUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDBgqDcINbATYCJAMMCwgABCAFhGcHNhs3B1GUzUmS7GMx3b6AjDFRcXKamMciqJa/79ndO1IKHkd5VIwKY5AoUAJhEBahcfyfjXjz2eVPIM9Gxl4Ozsxh+fYm8N5L9WG/HmKFDq5+p/85ZrzyAea3AUBGUeOAgiJ5OIqq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AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwECAQMBBAAFY2xvc2UEaGVscAAAAAA=') format('truetype'); } .iconfont { font-family: "qkkkk" !important; font-size: 1em; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .icon-close:before { content: "\\e60f"; } .icon-help:before { content: "\\e8a6"; } .mb8, #remuneration, #asideWriteGuide, #asideAds, #asideNewNps, #recommendNps, #footerRightAds, #blogExtensionBox, #dmp_ad_58, .toolbar-btns .toolbar-btn:not(.toolbar-btn-login), .programmer1Box, #recommendAdBox, .passport-login-tip-container, .toolbar-advert, .tool-active-list { display: none !important; } .list-type-box { padding: 0px 4px; background: #21940d; border-radius: 2px; color: #fff; font-weight: 500; font-size: 12px; margin-right: 5px; } #content_views pre, #content_views pre code { -webkit-user-select: unset; user-select: unset; } .logo-icon svg { width: 1em; height: 1em; vertical-align: text-bottom; } .qk-openvippay { -ms-flex-negative: 0; flex-shrink: 0; width: 220px; height: 40px; border-radius: 20px; border: 1px solid #fc5531; display: inline-block; text-align: center; line-height: 38px; color: #fc5531; font-size: 16px; font-weight: 600; position: relative; background: #fff; cursor: pointer; } @media screen and (max-width: 1200px) { .blog_container_aside { display: none; } .nodata .container main { width: 100%; } } .qk-dialog-container .close { position: absolute; top: 6px; right: 8px; font-size: 20px; line-height: 1; cursor: pointer; color: #767676; z-index: 1; } .qk-dialog-container .login-form { position: absolute; width: 280px; padding: 24px; top: 8px; right: 18px; border: 1px solid rgba(204, 204, 204, 0.212); background-color: #f5f5f5; color: #1a1a1a; border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18); } .qk-dialog-container .login-form .tb { margin-top: 14px; } .qk-dialog-container h2 { font-size: 24px; margin: 0.83em 0; } .qk-dialog-container .notify { position: absolute; top: 0; left: 0; right: 0; height: 32px; line-height: 32px; background-color: #4b4e7d; color: #fff; text-align: center; font-size: 14px; border-top-left-radius: 4px; border-top-right-radius: 4px; transition: all 0.25s; } .qk-dialog-container .notify.error { background-color: #f44336; } .qk-dialog-container .notify.success { background-color: #4caf50; } .qk-dialog-container .notify.info { background-color: #2196f3; } .qk-dialog-container .notify.warning { background-color: #ff9800; } .qk-dialog-container .row { display: flex; } .qk-dialog-container .tb .row { border-top: 1px solid #616161; border-bottom: 1px solid #616161; margin-top: -1px; } .qk-dialog-container .tb .row .label { width: 80px; flex-shrink: 0; padding: 8px 6px; background-color: #bdbdbd; } .qk-dialog-container .tb .row .value { padding: 8px 6px; } .qk-dialog-container button { border-radius: 4px; border: none; height: 32px; line-height: 30px; text-align: center; font-weight: 500; font-family: inherit; background-color: #3564bb; color: rgba(255, 255, 255, 0.87); cursor: pointer; transition: all 0.25s; } .qk-dialog-container button:disabled { opacity: 0.5; } .qk-dialog-container button:hover { background-color: #1f4996; } .qk-dialog-container .form-item { flex: 1; margin-bottom: 14px; } .qk-dialog-container .form-item button { width: 100%; letter-spacing: 1em; } .qk-dialog-container .input_wrapper { display: flex; height: 32px; border: 1px solid #d3d3d3; background-color: transparent; border-radius: 4px; } .qk-dialog-container .input_wrapper input { flex: 1; width: 100%; padding: 0 8px; color: inherit; border: none; outline: none; background-color: transparent; } .qk-dialog-container .code-send { width: 100px; margin-left: 8px; letter-spacing: 0; } .qk-dialog-container .hint { font-size: 12px; text-align: center; } .qk-dialog-container .hint .span-btn { margin-left: 0; } .qk-dialog-container .span-btn { color: #535bf2; border: 1px dashed #535bf2; border-radius: 4px; padding: 2px 4px; cursor: pointer; font-size: 12px; margin-left: 6px; } .qk-dialog-container .span-btn:hover { opacity: 0.7; } .qk-dialog-container .to-buy { display: none; } .spirit-qk-icon { position: fixed; right: -10px; top: 50px; width: 44px; height: 34px; display: flex; padding: 6px; align-items: center; box-sizing: border-box; background: linear-gradient(140.91deg, #6dc15e 12.61%, #1c7f0a 76.89%); border-top-left-radius: 17px; border-bottom-left-radius: 17px; cursor: pointer; transition: all 0.3s ease-in-out; color: white; opacity: 0.6; z-index: 9999; } .spirit-qk-icon svg { width: 24px; height: 24px; transition: all 0.3s ease-in-out; } .spirit-qk-icon:hover { opacity: 1; transform: translateX(-10px); } .spirit-qk-icon:hover svg { width: 28px; height: 28px; } .qk-dialog-container { position: fixed; top: 0; width: 100vw; z-index: 9999; } .qk-dialog-container .mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); } .qk-dialog-container .modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 200px; background-color: white; border: 1px solid rgba(204, 204, 204, 0.4); border-radius: 4px; margin: auto; padding: 24px; display: flex; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } .qk-dialog-container .modal .left { flex: 1; min-width: 250px; } .qk-dialog-container .modal .right { position: relative; margin-left: 30px; text-align: center; } .qk-dialog-container .modal .right::before { content: ''; position: absolute; display: block; top: 0; bottom: 0; left: -15px; width: 0; border-left: 1px dashed #a8a8a854; } .qk-dialog-container .modal .right .title { margin: 12px; } .qk-dialog-container .modal .right .title i { color: #999; margin-left: 4px; } .qk-dialog-container .modal .right .goods-qr { height: 150px; display: block; line-height: 150px; background-color: #f5f5f5; border: 1px solid #e5e5e5; border-radius: 4px; opacity: 1; text-align: center; } .qk-dialog-container .modal .tip { font-size: 12px; color: #999; } .agreement-root { position: fixed; top: 50%; left: 50%; width: 480px; max-width: 80%; padding: 45px 0; border-radius: 10px; background-image: url(https://static.hitv.com/pc/img/601d3ee.png), url(https://static.hitv.com/pc/img/21b00eb.png); background-position: 0 0, 100% 280px; background-repeat: no-repeat; background-color: #fff; box-shadow: 0 0 80px rgba(0, 0, 0, 0.25); opacity: 1; transform: translate(-50%, -50%); z-index: 99999; } .title { color: #222; font-weight: 700; font-size: 28px; text-align: center; } .content { width: 100%; max-height: 70vh; margin: 35px auto 40px; overflow-x: hidden; overflow-y: auto; } .content p { margin: 0 50px 5px; color: #777; font-weight: 400; font-size: 13px; line-height: 22px; word-break: break-all; text-align: justify; } .btns { display: flex; margin: 0 20px; justify-content: space-evenly; } .btns button { width: 100px; height: 45px; border: none; border-radius: 25px; outline: none; color: #fff; background: #c2c1c1; font-weight: 700; font-size: 15px; line-height: 45px; transition: all 0.3s; cursor: pointer; } .btns button:hover { opacity: 0.7; } .btns .agree { width: 130px; background: #ffa000; background: linear-gradient(90deg, #ff5f00, #ffa000); } /*$vite$:1*/`); const $ = window.jQuery || unsafeWindow.jQuery; const template$2 = '

用户登录

还没有账号?立即注册
'; const infoHtm = '
会员类型
{{ levelName }} 购买套餐
到期时间
{{ expirationDate }}
下载次数
{{ points }}添加
'; const template$1 = '
'; class Dialog { constructor(opt = {}) { __publicField(this, "template", template$1); /** @type {JQuery} */ __publicField(this, "$el"); this.$el = $(this.template); opt.mask ? this.$el.find(".mask").show() : this.$el.find(".mask").hide(); } append(dom) { this.$el.find(".dialog-body").append(dom); return this; } } function ajax(obj) { let success = obj.success; let error = obj.error; let p; if (!success) { p = new Promise((resolve, reject) => { success = resolve; error = reject; }); } const headers = obj.headers || {}; const token = getToken(); headers.deviceId = deviceId(); if (token) { headers.Authorization = token; } obj.headers = headers; obj.success = success; obj.error = error; { obj.responseType = obj.dataType || "json"; if (obj.method === "GET") { const u = new URL(obj.url); for (const [k, v] of Object.entries(obj.data || {})) { u.searchParams.append(k, v); } obj.url = u.href; } else { obj.data = JSON.stringify(obj.data); obj.headers["Content-Type"] = "application/json"; } obj.onreadystatechange = (_a2) => { if (_a2.readyState === 4) { const { response, status } = _a2; if (status === 200) { success(response); } else { const err = new Error((response == null ? void 0 : response.message) || "网络错误"); err.responseJSON = response; err.xhr = _a2; error(err); } } }; } const _a = GM_xmlhttpRequest(obj); return p || _a; } const token_key = "token"; function getToken() { return GM_getValue(token_key); } function setToken(token) { return GM_setValue(token_key, token); } function removeToken() { return GM_deleteValue(token_key); } function setStore(key, value, isQs = true) { return GM_setValue(key, value); } function getStore(key) { let val = GM_getValue(key); return val; } function removeStore(key) { return GM_deleteValue(key); } function deviceId() { let id = getStore("deviceId"); if (!id) { id = "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(c) { const r = Math.random() * 16 | 0; const v = c === "x" ? r : r & 3 | 8; return v.toString(16); }).toUpperCase(); setStore("deviceId", id); } return id; } function stringTemplate(template2, data) { return template2.replace(/\{\{(.+?)\}\}/g, (match, key) => data[key.trim()]); } const base = "https://zsapi.qktk.online/v1/api"; function login(data) { return ajax({ url: `${base}/user/login`, method: "POST", data }); } function register(data) { return ajax({ url: `${base}/user/register`, method: "POST", data }); } function getUserInfo() { return ajax({ url: `${base}/user/me`, method: "GET" }); } function sendVerifyCode(data) { return ajax({ url: `${base}/user/send_verification_code`, method: "POST", data }); } function useCardkey(data) { return ajax({ url: `${base}/user/useCardkey`, method: "POST", data }); } function getArticle(data) { return ajax({ url: `${base}/client/query`, data: { ...data, type: "plugin" }, method: "GET" }); } function getConfig(data) { return ajax({ url: `${base}/config/get`, data, method: "GET" }); } const loginSvg = '\r\n\r\n\r\n\r\n\r\n'; const template = ''; class Notify { constructor(options) { __publicField(this, "template", `
`); /** @type {JQuery} */ __publicField(this, "$el"); this.options = options; this.$el = $(this.template); this.$el.hide(); } success(msg, delay) { this.$el.html(msg).attr("class", "notify success"); this.show(delay); } error(msg, delay) { this.$el.html(msg).attr("class", "notify error"); this.show(delay); } info(msg, delay) { this.$el.html(msg).attr("class", "notify info"); this.show(delay); } warning(msg, delay) { this.$el.html(msg).attr("class", "notify warning"); this.show(delay); } show(delay = 2e3) { this.$el.show(); delay && setTimeout(() => { this.$el.fadeOut("slow"); }, delay); } } const _Active = class _Active { constructor() { __publicField(this, "template", template); /** @type {JQuery} */ __publicField(this, "$el", null); /** @type {Dialog} */ __publicField(this, "dialog", null); /** @type {Notify} */ __publicField(this, "notify", null); __publicField(this, "_insert", false); this.$el = $(this.template); this.$el.find("#convert").on("click", this.active.bind(this)); this.$el.find(".close").on("click", () => { this.hide(); }); this.dialog = new Dialog(); this.dialog.append(this.$el); this.notify = new Notify(); this.$el.append(this.notify.$el); this.renderGoods(); this.renderTip(); } renderGoods() { const goodsQr = LoginModal.instance.getConfig("goodsQr"); const goodsUrl = LoginModal.instance.getConfig("goodsUrl"); const goodsTip = LoginModal.instance.getConfig("goodsTip"); if (!goodsQr && !goodsUrl) { this.$el.find(".right").hide(); } if (goodsQr) { this.$el.find(".goods-qr").attr("src", goodsQr.value); } if (goodsUrl) { this.$el.find(".goods-url").attr("href", goodsUrl.value); } if (goodsTip) { this.$el.find(".right .tip").html(goodsTip.value); } } renderTip() { const tip = LoginModal.instance.getConfig("activeTip"); this.$el.find(".left .tip").html((tip == null ? void 0 : tip.value) || ""); } show() { if (window !== top) return; if (this._insert) { this.dialog.$el.show(); return; } this.dialog.$el.appendTo(document.body); this._insert = true; this.dialog.$el.show(); } hide() { this.dialog.$el.hide(); } async active() { var _a, _b; const { $el } = this; const key = $el.find("input[name=key]").val(); if (!key) { return this.notify.warning("请输入激活码"); } try { const res = await useCardkey({ key }); this.notify.success(res.message); (_a = LoginModal.instance) == null ? void 0 : _a.showInfo(); $el.find("input[name=key]").val(""); this.hide(); } catch (error) { this.notify.error(((_b = error.responseJSON) == null ? void 0 : _b.message) || "激活失败!", 3e3); } } }; /** @type {Active} */ __publicField(_Active, "instance", null); __publicField(_Active, "show", () => { if (!_Active.instance) { _Active.instance = new _Active(); } _Active.instance.show(); }); let Active = _Active; class LoginModal { constructor() { __publicField(this, "template", template$2); __publicField(this, "status", 1); __publicField(this, "time", 60); /** 剩余使用时间毫秒 */ __publicField(this, "expirationTime", 0); __publicField(this, "userData", null); __publicField(this, "configList", []); __publicField(this, "T", null); /** @type {JQuery} */ __publicField(this, "$el", null); /** @type {JQuery} */ __publicField(this, "$spirit"); /** @type {Notify} */ __publicField(this, "notify", null); /** @type {Dialog} */ __publicField(this, "dialog", null); __publicField(this, "_insert", false); __publicField(this, "_isShow", true); const dom = $(`${this.template}`); this.$el = dom; this.dialog = new Dialog(); this.dialog.append(dom); this.notify = new Notify(); this.$el.append(this.notify.$el); if (getToken()) { this.showInfo(getStore("user")); } this.renderSpirit(); this.initLoginEvents(); } initLoginEvents() { const { $el } = this; const that = this; $el.find(".close").on("click", function() { that.hide(); }); $el.find(".to-register-btn").on("click", function() { that.loginStatus($el); }); $el.find(".code-send").on("click", function() { const destination = $el.find("input[name=username]").val(); if (!destination) { return that.notify.warning("请输入邮箱地址"); } else if (!that.verifyEmail(destination)) { return that.notify.warning("请输入正确的邮箱地址"); } $(this).attr("disabled", true); that.sendCode(destination); }); $el.find(".submit").on("click", function(e) { that.submit(); e.preventDefault(); }); $el.on("mouseenter", () => { this.__closeTimer && clearTimeout(this.__closeTimer); }); $el.on("mouseleave", this.downCountClose.bind(this)); this.downCountClose(); } show() { if (window !== top) return; this.$spirit.hide(); this._isShow = true; if (this._insert) { this.dialog.$el.show(); return; } this.dialog.$el.appendTo(document.body); this._insert = true; this.dialog.$el.show(); } hide() { this.dialog.$el.hide(); this.$spirit.show(); this._isShow = false; } async showInfo(userData) { var _a, _b; try { if (userData) { this.renderInfo(userData); if (Date.now() - (userData.saveTime || 0) < 864e5) { return; } } const { success, data, message, token } = await getUserInfo(); if (success) { data.levelName = data.vipLevel > 1 ? "VIP用户" : "体验用户"; data.points = Math.floor(data.points / 20); data.saveTime = Date.now(); setStore("user", data); setToken(token); this.renderInfo(data); } else { this.notify.warning(message); } } catch (error) { removeToken(); this.show(); this.$el.find("form").show(); this.userData = null; removeStore("user"); (_a = this.$info) == null ? void 0 : _a.hide(); this.notify.error(((_b = error.responseJSON) == null ? void 0 : _b.message) || "获取用户信息失败", 3e3); } } renderInfo(data) { this.userData = data; getConfig({ key: "goodsQr,goodsUrl,goodsTip,activeTip,greeting" }).then((res) => { if (res.success) { this.configList = res.data || []; this.render2buy(); } }); const infoDom = $(stringTemplate(infoHtm, data)); this.$el.find("form").hide(); this.$el.append(infoDom); this.$info = infoDom; this.initInfoEvent(); const exDate = new Date(data.expirationDate).getTime(); const s = exDate - Date.now(); this.expirationTime = s; if (s <= 0) { this.notify.info("您的会员已到期,请续费再使用!", 0); } else if (s <= 3 * 864e5) { this.notify.info("您的会员即将到期,请及时续费!", 0); } else { this.notify.success("欢迎使用qk插件", 0); } this.dialog.$el.hide(); } render2buy() { const urlConfig = this.getConfig("goodsUrl"); if (urlConfig) { this.$el.find(".to-buy").attr("href", urlConfig.value).show(); } else { this.$el.find(".to-buy").hide(); } const greeting = this.getConfig("greeting"); if (greeting && this.expirationTime > 3 * 864e5) { this.notify.success(greeting == null ? void 0 : greeting.value, 0); } } getConfig(key) { return this.configList.find((item) => item.key === key); } renderSpirit() { this.$spirit = $(`
${loginSvg}
`).appendTo(document.body).on("click", () => { this.$spirit.hide(); this.show(); }); } initInfoEvent() { const { $el } = this; $el.find(".to-active").on("click", () => { Active.instance = new Active(); Active.instance.show(); }); } downCountClose() { if (!this._isShow) return; this.__closeTimer = setTimeout(() => { this.hide(); }, 3e3); } async submit() { var _a; const data = this.$el.find("form").serializeArray(); const params = {}; let res; try { if (this.status) { const keys = ["username", "password"]; data.forEach((item) => { if (keys.includes(item.name)) { params[item.name] = item.value; } }); params.type = "email"; res = await login(params); } else { data.forEach((item) => { params[item.name] = item.value; }); params.type = "email"; res = await register(params); } if (res.success) { this.status = 1; setToken(res.data); this.showInfo(); } else { this.notify.warning(res.message, 3e3); } } catch (error) { this.notify.error(((_a = error.responseJSON) == null ? void 0 : _a.message) || "登录失败", 3e3); } } async sendCode(email) { var _a; try { const res = await sendVerifyCode({ destination: email, type: "email" }); if (res.success) { this.time = 60; this.downCount($(".code-send")); this.notify.success("验证码发送成功", 3e3); } else { this.notify.warning(res.message, 3e3); } } catch (error) { this.notify.error(((_a = error.responseJSON) == null ? void 0 : _a.message) || "发送验证码失败", 3e3); } } /** * 倒计时 * @param {JQuery} dom */ downCount(dom) { dom.text(this.time + "秒后再获取"); this.T = setTimeout(() => { this.time--; if (this.time <= 0) { dom.text("重新获取"); dom.attr("disabled", false); clearTimeout(this.T); } else { this.downCount(dom); } }, 1e3); } /** * 登录和注册ui切换 * @param {JQuery} dom */ loginStatus(dom) { if (this.status) { dom.find("#confirmP,#code").show(); dom.find(".hint .text").text("已有账号?"); dom.find(".to-register-btn").text("立即登录"); dom.find("h2").text("用户注册"); this.status = 0; } else { dom.find("#confirmP,#code").hide(); dom.find(".hint .text").text("还没账号?"); dom.find(".to-register-btn").text("立即注册"); dom.find("h2").text("用户登录"); this.status = 1; } } verifyEmail(val) { return /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(val); } } /** @type {LoginModal} */ __publicField(LoginModal, "instance", null); class CSDN { constructor() { __publicField(this, "config", { hideOBtn: false }); __publicField(this, "$hideBox", $(".hide-article-box")); __publicField(this, "loading", false); this.exCopyAstrict(); this.normalMore(); this.loginModule(); this.createDetailBtn(); } exCopyAstrict() { document.addEventListener("copy", (e) => { e.stopPropagation(); }, true); $(".hljs-button.signin").attr("data-title", "复制").removeClass("active").removeAttr("onClick"); $("#content_views").on("click", ".hljs-button.signin", function(e) { navigator.clipboard.writeText($(this).parent()[0].innerText.replace(/[\u00A0]/gi, " ")).then((res) => { $(this).attr("data-title", "复制成功"); setTimeout(() => { $(this).attr("data-title", "复制"); }, 3e3); }); }); } normalMore() { const btn = this.$hideBox.find(".btn-readmore"); if (btn.length) { btn.removeClass("no-login").find(".follow-text").text("展开全文"); } } loginModule() { const loginBtn = $(".toolbar-btns .toolbar-btn-login"); let btnClick = false; loginBtn.on("click", () => btnClick = true); const mutation = new MutationObserver((mon) => { const lgm = mon.find((m) => $(m.addedNodes[0]).hasClass("passport-login-container")); if (lgm) { const dom = $(lgm.addedNodes[0]); if (!btnClick) dom.remove(); else dom.find("img").one("click", () => btnClick = false); } }); mutation.observe(document.body, { childList: true }); } footerList() { function fn() { const list = $(".recommend-item-box"); list.each((i, el) => { if ($(el).find(".list-type-box")[0]) return; const url = $(el).attr("data-url") || ""; if (!url) return; if (url.indexOf("blog.csdn.net") !== -1) { $(el).prepend(`
`); } else if (url.indexOf("download.csdn.net") !== -1) { $(el).prepend(`
`); } else if (url.indexOf("edu.csdn.net") !== -1) { $(el).prepend(`
`); } else { $(el).prepend(`
`); } }); } setTimeout(() => { fn(); }, 5e3); } createDetailBtn() { const $moreBtn = $(`${loginSvg}解锁全文`); $moreBtn.on("click", csdnDetail); const $vipMask = this.$hideBox.find(".vip-mask"); if ($vipMask.length) { this.config.hideOBtn && $("#getVipUrl").hide(); this.$hideBox.find(".vip-mask").append($moreBtn); } const $column = this.$hideBox.find(".column-mask"); if ($column.length) { const group = document.querySelector(".column-group"); if (group) { const btn = group.querySelector(".column-studyvip-free,.article-column-subscribe"); if (!btn) { return; } } const $div = $('
'); $column.after($div); $div.append($moreBtn); this.config.hideOBtn && $column.hide(); } } createDownload() { const $downloadBtn = $(``); $("#downloadBtn .el-button").first().before($downloadBtn); $downloadBtn.on("click", () => { }); } } __publicField(CSDN, "instance", null); function markdown_line() { $(".markdown_views pre").addClass("prettyprint"), $("pre.prettyprint code").each(function() { var t = $(this).text().split("\n").length + ($(this).hasClass("hljs") ? 1 : 0), e = $("
    ").addClass("pre-numbering").hide(); $(this).addClass("has-numbering").parent().append(e); for (var o = 1; o < t; o++) e.append($("
  • ").text(o)); e.fadeIn(1700); }), $(".pre-numbering li").css("color", "#999"), setTimeout(function() { $(".math").each(function(t, e) { $(this).find("span").last().css("color", "#fff"); }); }), setTimeout(function() { $(".toc a[target='_blank']").attr("target", ""), $("a.reversefootnote,a.footnote").attr("target", ""); }, 500); } function createMenu(dom) { var _a, _b; const menuBox = $(".toc-box"); const menu = dom.find(".toc ul"); const _menu = $((_a = menu[0]) == null ? void 0 : _a.outerHTML.replace(/ul|ul/g, "ol")); _menu.find("li").each(function(i, el) { if (el.querySelector("ul,ol")) { el.classList.add("sub-box"); } }); menuBox.html((_b = _menu[0]) == null ? void 0 : _b.outerHTML); } async function csdnDetail() { var _a; const $content = $("#content_views"); if (!LoginModal.instance.userData) { LoginModal.instance.show(); LoginModal.instance.notify.warning("请先登录"); return; } if (LoginModal.instance.expirationTime <= 0) { Active.show(); Active.instance.notify.warning("您的使用时间已到,需要续费再使用"); return; } if (CSDN.instance.loading) { return; } CSDN.instance.loading = true; try { const res = await getArticle({ url: window.location.href, type: "plugin" }); if (res.success) { console.log("这里执行内容替换"); $content.html(res.data); (_a = document.querySelector("#article_content")) == null ? void 0 : _a.removeAttribute("style"); setTimeout(() => { markdown_line(); createMenu($content); $content.find("pre").each(function(t, e) { e = $(e), e.find("code").append(``), e.find("code").height() > 340 ? (e.addClass("set-code-hide"), e.append('
    ')) : e.addClass("set-code-show"); }); $content.on("click", ".hide-preCode-bt", function() { $(this).parents("pre").removeClass("set-code-hide").addClass("set-code-show"), $(this).parents(".hide-preCode-box").hide().remove(), $(window).resize().scroll(); }); $(".hide-article-box").hide(); }); } } catch (error) { console.log(error); } finally { CSDN.instance.loading = false; } } CSDN.instance = new CSDN(); const globalState = { url: "", $content: null }; function generateMoreBtn(dom = $(document)) { const PaidAnswerFooter = dom.find(".KfeCollection-PaidAnswerFooter"); const $moreBtn = $(`${loginSvg}解锁全文`); PaidAnswerFooter.find(".KfeCollection-PurchaseBtn").append($moreBtn); const oBtn = PaidAnswerFooter.find(".KfeCollection-PurchaseBtn-HybridLink"); oBtn.parent().hide(); $moreBtn.on("click", function() { globalState.$content = $(this).closest(".ContentItem"); globalState.url = globalState.$content.children("meta[itemprop=url]").attr("content"); zhihuDetail(); }); } document.addEventListener("click", function(e) { if (["ContentItem-more", "ContentItem-expandButton"].some((key) => e.target.classList.contains(key))) { const contentItem = $(e.target).closest(".ContentItem"); const url = contentItem.children("meta[itemprop=url]").attr("content"); const $article = contentItem.find(".RichText"); globalState.url = url; globalState.$content = $article; generateMoreBtn(contentItem); } }); async function zhihuDetail() { if (!LoginModal.instance.userData) { LoginModal.instance.show(); LoginModal.instance.notify.warning("请先登录"); return; } if (LoginModal.instance.expirationTime <= 0) { Active.show(); Active.instance.notify.warning("您的使用时间已到,请续费"); return; } const $article = globalState.$content.find(".RichText"); try { const res = await getArticle({ url: globalState.url, type: "plugin" }); if (res.success) { console.log("这里执行内容替换"); $article.html(res.data); } } catch (error) { console.log(error); } } setTimeout(() => { generateMoreBtn(); }, 1e3); const html = '
    QK脚本使用协议

    欢迎使用qk脚本!请仔细阅读以下免责申明:

    1.有能力的情况,请大家支持正版

    2.解析的文章均来至互联网用户分享,我们尽力确保所提供资料的质量,但不能保证其绝对准确性和完整性。

    3.使用本脚本所解析的任何资源即表示您同意自行承担风险。我们不对因使用这些资源而导致的任何损失或损害承担责任。

    4.用户必须遵守所有相关法律法规,不得从事任何违法活动。对于违反本社区准则的行为,我们将采取适当措施处理。

    5.本免责声明中的条款可能会随时更改;请经常回访以获取最新信息。

    6.如果您有任何疑问或需要帮助,请联系:snphacker@vip.qq.com

    7.点击我同意后,即已代表您已经充分了解相关问题,否则后果自负,特此声明!

    '; class Protocol { constructor(options) { __publicField(this, "template", html); __publicField(this, "$protocol", null); this.options = options; this.init(); } init() { this.render(); this.bindEvent(); } render() { const $protocol = $(this.template); $("body").append($protocol); this.$protocol = $protocol; } bindEvent() { const $agree = this.$protocol.find(".agree"); const $close = this.$protocol.find(".close"); $agree.on("click", () => { this.options.onAgree(); this.$protocol.remove(); }); $close.on("click", () => { this.$protocol.remove(); }); $(document).on("click", (e) => { let c = e.target; while (c) { if (c === this.$protocol[0]) { return; } c = c.parentNode; } this.$protocol.remove(); }); } } const agree = getStore("agree"); if (agree) { LoginModal.instance = new LoginModal(); } else { Protocol.instance = new Protocol({ onAgree: () => { setStore("agree", 1); LoginModal.instance = new LoginModal(); } }); } })();