// ==UserScript==
// @name qk文章资源共享|CSDN|知乎|专栏|会员文章|盐选|文件下载|CSDN积分
// @namespace https://zsh5.qktk.online/
// @version 0.0.6-beta
// @icon data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMjAwMTA5MDQvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMtU1ZHLTIwMDEwOTA0L0RURC9zdmcxMC5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHZpZXdCb3g9IjAgMCAzODkgMzk1IiBzdHlsZT0iIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0Ij4NCjxnIGZpbGw9IiNGM0RCQzhGRiIgc3Ryb2tlPSIjRjNEQkM4RkYiPg0KPHBhdGggZD0iTSAxODIuNTAwIDQ0LjEwOSBDIDE2NS4zNTIgNDYuNTgwIDE0NC4xODUgNTUuNDMyIDEzMC4xNjQgNjUuOTk3IEMgMTExLjQwMiA4MC4xMzUgOTguMDk0IDEwMS4zNTAgOTIuNDYwIDEyNi4xMDQgQyA5MS4wNjUgMTMyLjIzNCA5MC42OTIgMTQxLjIxMiA5MC4yODMgMTc4LjU2NCBDIDg5Ljc5MyAyMjMuMjc4IDkwLjQ5OCAyNDEuMzU0IDkzLjExMyAyNTEuMTMxIEMgOTQuMjk0IDI1NS41NTAgOTQuMjEyIDI1NS45NjMgOTEuMDMxIDI2MS42MTUgQyA4MS4yMTkgMjc5LjA0NyA2OC44MzIgMjg5LjI4OCA1Mi4zNzMgMjkzLjU3NSBDIDQ1LjcwOSAyOTUuMzExIDQzLjU4OSAyOTYuOTI4IDQwLjc5MCAzMDIuNDEzIEMg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AxMzkuNTAwIDE4My41MDAgQyAxMzkuNTAwIDEyMy41NzggMTM5LjUxNiAxMjMuNDA3IDE0Ni4zMzQgMTEwLjUxMyBDIDE1Mi4zMzkgOTkuMTU3IDE2Ny4yNjAgODcuNTQzIDE3OC41NzAgODUuNDIxIEMgMTgwLjQ1NyA4NS4wNjcgMTgyLjAwMCA4NC4zNTEgMTgyLjAwMCA4My44MzAgQyAxODIuMDAwIDgzLjMwOCAxODIuMzYxIDgzLjEwNSAxODIuODAyIDgzLjM3OCBDIDE4My4yNDMgODMuNjUwIDE4Ni43MzAgODMuNDk0IDE5MC41NTIgODMuMDMwIEMgMTk4Ljk0NCA4Mi4wMTMgMjA5LjQwNiA4Mi42MjEgMjE3LjQzNCA4NC41OTQgIi8+PC9nPg0KPC9zdmc+DQo=
// @description 🐚🐚功能介绍🐚🐚:🔥csdn,去除广告🔥,🔥免登陆复制,查看全文🔥,控制登陆弹窗频次,文件下载,🔥解析csdn会员文章🔥,🔥超级会员文章🔥,知乎,🔥解析知乎盐选,专栏🔥
// @author 佚名
// @match *://*.blog.csdn.net/*
// @match *://*.zhihu.com/*
// @match *://download.csdn.net/*
// @connect qktk.online
// @support https://scriptcat.org/zh-CN/script-show-page/2474/issue
// @supportUrl https://scriptcat.org/zh-CN/script-show-page/2474/issue
// @antifeature membership
// @license MIT
// @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
// @grant GM_info
// ==/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 {\r
font-family: "qkfont"; /* Project id 4739727 */\r
src: url('data:font/woff2;base64,d09GMgABA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AAQAAAAAAAwAIACIAAQAAAAAABAAIACoAAQAAAAAABQALADIAAQAAAAAABgAIAD0AAQAAAAAACgArAEUAAQAAAAAACwATAHAAAwABBAkAAAAmAIMAAwABBAkAAQAQAKkAAwABBAkAAgAOALkAAwABBAkAAwAQAMcAAwABBAkABAAQANcAAwABBAkABQAWAOcAAwABBAkABgAQAP0AAwABBAkACgBWAQ0AAwABBAkACwAmAWNDcmVhdGVkIGJ5IGljb25mb250aWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAECAQMBBAEFAAdsb2FkaW5nBWNsb3NlBGhlbHAAAA==') format('truetype');\r
}\r
\r
.iconfont {\r
font-family: "qkfont" !important;\r
font-size: 16px;\r
font-style: normal;\r
-webkit-font-smoothing: antialiased;\r
-moz-osx-font-smoothing: grayscale;\r
}\r
\r
.icon-loading:before {\r
content: "\\e891";\r
}\r
\r
.icon-close:before {\r
content: "\\e60f";\r
}\r
\r
.icon-help:before {\r
content: "\\e8a6";\r
}\r
\r
.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,
.hide-aside,
.tool-active-list {
display: none !important;
}\r
\r
.list-type-box {
padding: 0px 4px;
background: #21940d;
border-radius: 2px;
color: #fff;
font-weight: 500;
font-size: 12px;
margin-right: 5px;
}\r
\r
#content_views,
#content_views pre,
#content_views pre code {
-webkit-user-select: unset;
user-select: unset;
}\r
\r
.logo-icon svg {
width: 1em;
height: 1em;
vertical-align: text-bottom;
}\r
\r
.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;
}\r
\r
@keyframes loading {
form {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}\r
\r
.icon-loading {
display: none;
}\r
\r
.btn-loading {
position: relative;
}\r
\r
.btn-loading:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.55);
border-radius: 20px;
}\r
\r
.btn-loading .icon-loading {
position: absolute;
display: block;
left: 50%;
top: 0;
color: #f2f2f2;
animation: 0.6s loading linear infinite;
}\r
\r
.qk-toast {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-width: 500px;
padding: 6px 10px;
font-size: 14px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
z-index: 999;
}\r
\r
.qk-toast.error {
background: #f5222dd6;
box-shadow: 0 0 10px #f5222d23;
}\r
\r
@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 .log-info {
position: absolute;
bottom: 0px;
right: 10px;
font-size: 12px;
color: #8e8e8e;
}
.qk-dialog-container .log-info a {
color: initial;
}
.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;
padding: 8px 8px;
padding-right: 32px;
line-height: 16px;
background-color: #4b4e7d;
color: #fff;
text-align: center;
word-break: break-all;
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 .action-btns {
margin-top: 8px;
}
.qk-dialog-container .action-btns .jx {
display: none;
}
.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 .hint .temp {
display: none;
}
.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.5;
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;
max-width: 180px;
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;
margin: 0 auto;
}
.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;
}
.agreement-root .title {
color: #222;
font-weight: 700;
font-size: 28px;
text-align: center;
}
.agreement-root .content {
width: 100%;
max-height: 70vh;
margin: 35px auto 40px;
overflow-x: hidden;
overflow-y: auto;
}
.agreement-root .content p {
margin: 0 50px 5px;
color: #777;
font-weight: 400;
font-size: 13px;
line-height: 22px;
word-break: break-all;
text-align: justify;
}
.agreement-root .btns {
display: flex;
margin: 0 20px;
justify-content: space-evenly;
}
.agreement-root .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;
}
.agreement-root .btns button:hover {
opacity: 0.7;
}
.agreement-root .btns .agree {
width: 130px;
background: #ffa000;
background: linear-gradient(90deg, #ff5f00, #ffa000);
}
/*$vite$:1*/`);
const $ = window.jQuery || unsafeWindow.jQuery;
const template$2 = '<div class="login-form qk-user"><div class="close iconfont icon-close"></div><form><h2>用户登录</h2><div class="input_wrapper form-item"><input name="username" placeholder="请输入邮件地址" /></div><div id="code" class="row" style="display: none;"><div class="input_wrapper form-item"><input name="code" placeholder="请输入验证码" /></div><button type="button" class="code-send">获取验证码</button></div><div class="input_wrapper form-item"><input name="password" type="password" placeholder="请输入密码" /></div><div id="confirmP" class="input_wrapper form-item" style="display: none;"><input name="password_confirm" type="password" placeholder="请再次输入密码" /></div><div class="form-item"><button class="submit">登录</button></div><div class="hint"><span class="text">还没有账号?</span><span class="to-register-btn span-btn">立即注册</span><span class="temp">或<span class="span-btn c_temp">先不登录</span>,直接使用</span></div></form></div>';
const infoHtm = '<div class="tb"><div class="row"><div class="label">邮箱账号</div><div class="value">{{ email }}</div></div><div class="row"><div class="label">会员类型</div><div class="value">{{ levelName }} <a class="span-btn to-buy" target="_blank">购买套餐</a></div></div><div class="row"><div class="label">到期时间</div><div class="value">{{ expirationDate }}</div></div><div class="row"><div class="label">下载次数</div><div class="value">{{ points }}<span class="span-btn to-active">添加</span></div></div><div class="action-btns"><span class="span-btn jx">解锁全文</span><span class="span-btn to-active">续期</span><!-- <span class="span-btn to-active" target="_blank">添加下载次数</span> --></div></div>';
const template$1 = '<div class="qk-dialog-container"><div class="mask"></div><div class="dialog-body"></div></div>';
class Dialog {
constructor(opt = {}) {
__publicField(this, "template", template$1);
/** @type {JQuery<HTMLDivElement>} */
__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);
}
delete obj.data;
obj.url = u.href;
} else {
obj.data = JSON.stringify(obj.data);
obj.headers["Content-Type"] = "application/json";
}
obj.onerror = error;
obj.onreadystatechange = (_a2) => {
if (_a2.readyState === 4) {
const { response, status } = _a2;
if (status === 200) {
if ((response == null ? void 0 : response.code) === 401) {
LoginModal.instance.showLogin("登录失效,请重新登录");
error(response);
}
success(response);
} else {
if (status === 401) {
LoginModal.instance.showLogin("登录失效,请重新登录");
}
error(response);
}
}
};
}
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;
}
const version2Obj = (version) => {
if (!version) return {};
const [v, build] = version.split("-");
const [major, minor, patch] = v.split(".");
const o = { major, minor, patch, build, v: Number(major + minor + patch) };
return o;
};
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 userTemp(data) {
return ajax({
url: `${base}/user/temp_user`,
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 sourceGetUrl(data) {
return ajax({
url: `${base}/client/getUrl`,
data: { ...data },
method: "POST"
});
}
function getConfig(data) {
return ajax({
url: `${base}/config/get`,
data,
method: "GET"
});
}
const loginSvg = '<?xml version="1.0" encoding="utf-8"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\r\n<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="389" height="395" viewBox="0 0 389 395" style="" preserveAspectRatio="xMidYMid meet">\r\n<g fill="currentColor" stroke="currentColor">\r\n<path d="M 182.500 44.109 C 165.352 46.580 144.185 55.432 130.164 65.997 C 111.402 80.135 98.094 101.350 92.460 126.104 C 91.065 132.234 90.692 141.212 90.283 178.564 C 89.793 223.278 90.498 241.354 93.113 251.131 C 94.294 255.550 94.212 255.963 91.031 261.615 C 81.219 279.047 68.832 289.288 52.373 293.575 C 45.709 295.311 43.589 296.928 40.790 302.413 C 37.990 307.900 38.561 318.277 41.935 323.200 C 46.017 329.158 50.365 331.429 58.473 331.838 C 64.174 332.126 67.085 331.692 72.824 329.696 C 87.022 324.758 103.625 311.903 112.147 299.248 L 115.646 294.053 119.573 298.123 C 132.526 311.547 151.857 321.611 174.000 326.457 C 185.737 329.026 205.669 329.549 216.936 327.583 C 222.126 326.677 226.892 325.504 227.528 324.977 C 228.164 324.449 228.923 324.256 229.215 324.548 C 229.507 324.840 232.621 323.996 236.136 322.673 C 250.890 317.120 263.362 309.396 272.460 300.176 L 277.420 295.150 280.886 300.325 C 288.675 311.955 302.157 322.511 316.500 328.210 C 323.483 330.984 325.728 331.395 334.155 331.444 C 343.458 331.498 343.952 331.388 347.655 328.442 C 352.773 324.372 356.000 317.892 356.000 311.689 C 356.000 301.969 350.536 295.573 339.325 292.167 C 326.976 288.417 313.619 277.557 306.580 265.545 L 303.823 260.842 305.662 253.671 C 307.347 247.098 307.499 241.500 307.487 186.500 L 307.474 126.500 304.805 116.792 C 294.088 77.807 260.838 50.091 217.566 44.072 C 208.665 42.834 191.216 42.852 182.500 44.109 M 217.434 84.594 C 237.743 89.586 252.838 104.485 257.463 124.103 C 258.709 129.390 258.973 139.972 258.985 185.090 C 258.999 235.820 258.863 240.215 257.065 247.244 C 253.675 260.501 246.763 271.297 236.737 278.995 C 233.857 281.207 230.938 283.480 230.250 284.048 C 229.563 284.615 229.000 284.892 229.000 284.664 C 229.000 284.435 225.963 285.382 222.250 286.767 C 212.991 290.223 195.669 291.015 184.339 288.501 C 167.527 284.771 153.355 274.308 146.602 260.641 C 139.748 246.770 139.500 244.073 139.500 183.500 C 139.500 123.578 139.516 123.407 146.334 110.513 C 152.339 99.157 167.260 87.543 178.570 85.421 C 180.457 85.067 182.000 84.351 182.000 83.830 C 182.000 83.308 182.361 83.105 182.802 83.378 C 183.243 83.650 186.730 83.494 190.552 83.030 C 198.944 82.013 209.406 82.621 217.434 84.594 "/></g>\r\n</svg>';
const template = '<div class="modal"><div class="close iconfont icon-close"></div><div class="left"><h2>卡密兑换</h2><div class="input_wrapper form-item"><input name="key" placeholder="请输入激活码" /></div><div class="form-item"><button id="convert">兑换</button></div><div class="tip">这里加一些说明文字</div></div><div class="right"><p class="title">卡密获取<i class="iconfont icon-help" title="购买卡密"></i></p><a class="goods-url" target="_blank"><img src="" class="goods-qr" alt="点击去购买" title="点击去购买" /></a><div class="tip">请用淘宝App扫码购买</div></div></div>';
class Notify {
constructor(options) {
__publicField(this, "template", `
<div class="notify"></div>
`);
/** @type {JQuery<HTMLDivElement>} */
__publicField(this, "$el");
this.options = options;
this.$el = $(this.template);
this.$el.hide();
}
success(msg, delay) {
this.$el.html(msg).attr("class", "notify success");
if (delay === 0) {
this.msg = msg;
this.longMsgType = "success";
}
this.show(delay);
}
error(msg, delay) {
this.$el.html(msg).attr("class", "notify error");
if (delay === 0) {
this.msg = msg;
this.longMsgType = "error";
}
this.show(delay);
}
info(msg, delay) {
this.$el.html(msg).attr("class", "notify info");
if (delay === 0) {
this.msg = msg;
this.longMsgType = "info";
}
this.show(delay);
}
warning(msg, delay) {
this.$el.html(msg).attr("class", "notify warning");
if (delay === 0) {
this.msg = msg;
this.longMsgType = "warning";
}
this.show(delay);
}
close() {
this.msg = "";
this.longMsgType = "";
this.$el.html("");
clearTimeout(this.__timer);
this.$el.hide();
}
show(delay = 2e3) {
this.$el.show();
clearTimeout(this.__timer);
delay && (this.__timer = setTimeout(() => {
this.$el.fadeOut("slow", () => {
var _a;
if (this.msg) {
(_a = this[this.longMsgType]) == null ? void 0 : _a.call(this, this.msg, 0);
}
});
}, delay));
}
}
class Toast {
static show(text, duration = 2e3) {
const toast = document.createElement("div");
toast.classList.add("qk-toast");
toast.innerText = text;
document.body.appendChild(toast);
setTimeout(() => {
toast.remove();
}, duration);
}
// static showError(text, duration = 2000) {
// const toast = document.createElement('div')
// toast.classList.add('qk-toast', 'error')
// toast.innerText = text
// document.body.appendChild(toast)
// setTimeout(() => {
// toast.remove()
// }, duration)
// }
// constructor() {
// this.toast = document.createElement('div')
// this.toast.classList.add('qk-toast')
// this.toast.innerText = '加载中...'
// document.body.appendChild(this.toast)
// }
}
const _Active = class _Active {
constructor() {
__publicField(this, "template", template);
/** @type {JQuery<HTMLDivElement>} */
__publicField(this, "$el", null);
/** @type {Dialog} */
__publicField(this, "dialog", null);
/** @type {Notify} */
__publicField(this, "notify", null);
__publicField(this, "_insert", false);
if (_Active.instance) {
return _Active.instance;
}
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 == null ? void 0 : goodsQr.value) && !(goodsUrl == null ? void 0 : goodsUrl.value)) {
this.$el.find(".right").hide();
}
if (goodsQr == null ? void 0 : goodsQr.value) {
this.$el.find(".goods-qr").attr("src", goodsQr.value);
}
if (goodsUrl == null ? void 0 : goodsUrl.value) {
this.$el.find(".goods-url").attr("href", goodsUrl.value);
}
if (goodsTip == null ? void 0 : goodsTip.value) {
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;
const { $el } = this;
const key = $el.find("input[name=key]").val();
if (!key) {
return this.notify.warning("请输入激活码");
}
try {
const res = await useCardkey({ key });
if (res.success) {
this.notify.success(res.message);
(_a = LoginModal.instance) == null ? void 0 : _a.showInfo();
$el.find("input[name=key]").val("");
this.hide();
Toast.show("激活成功");
} else {
this.notify.error(res.message, 3e3);
}
} catch (error) {
this.notify.error((error == null ? void 0 : error.message) || "激活失败!", 3e3);
}
}
};
/** @type {Active} */
__publicField(_Active, "instance", null);
__publicField(_Active, "show", () => {
if (!_Active.instance) {
_Active.instance = new _Active();
}
_Active.instance.show();
});
let Active = _Active;
const _CSDN = 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();
this.immersionRead();
this.createDownload();
}
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);
});
});
}
immersionRead() {
setTimeout(() => {
if ($(".option-box.sidecolumn").length) return;
const hide_aside = +getStore("hide_aside") || 0;
const $btn = $(`<a class="option-box sidecolumn" style="display:flex">
<span class="hide">
<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/iconHideSide.png" alt="" srcset="">
<span class="show-txt">隐藏<br>侧栏</span>
</span>
<span class="show" style="display:none">
<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/iconShowSide.png" alt="" srcset="">
<span class="show-txt">显示<br>侧栏</span>
</span>
</a>`);
const $aside = $(".blog_container_aside");
const $right = $(".recommend-right");
const showBtn = (type) => {
if (type) {
$right.addClass("hide-aside");
$aside.addClass("hide-aside");
$btn.find(".show").show();
$btn.find(".hide").hide();
$btn.attr("data-type", "show");
} else {
$right.removeClass("hide-aside");
$aside.removeClass("hide-aside");
$btn.find(".show").hide();
$btn.find(".hide").show();
$btn.attr("data-type", "hide");
}
};
showBtn(hide_aside);
$btn.on("click", function() {
const type = this.dataset.type || "hide";
if (type === "hide") {
showBtn(1);
setStore("hide_aside", 1);
} else {
showBtn(0);
setStore("hide_aside", 0);
}
});
$(".csdn-side-toolbar .option-box").eq(0).before($btn);
}, 1e3);
}
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(`<div class="list-type-box">博</div>`);
} else if (url.indexOf("download.csdn.net") !== -1) {
$(el).prepend(`<div class="list-type-box">文</div>`);
} else if (url.indexOf("edu.csdn.net") !== -1) {
$(el).prepend(`<div class="list-type-box">育</div>`);
} else {
$(el).prepend(`<div class="list-type-box">其</div>`);
}
});
}
setTimeout(() => {
fn();
}, 5e3);
}
createDetailBtn() {
const $moreBtn = $(`<a class="openvippay" style="margin-top: 10px;">
<i class="logo-icon">${loginSvg}</i><span>解锁全文</span>
<i class="iconfont icon-loading"></i>
</a>`);
$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);
_CSDN.csdnDetail = csdnDetail;
}
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 = $('<div class="vip-mask"></div>');
$column.after($div);
$div.append($moreBtn);
_CSDN.csdnDetail = csdnDetail;
this.config.hideOBtn && $column.hide();
}
}
createDownload() {
var _a, _b;
const $downloadBtn = $(`<button type="button" class="el-button relative el-button--warning el-button--medium" >
<i class="logo-icon">${loginSvg}</i>
<i class="el-icon-loading"></i>
<span class="va-middle show">下载文件</span>
</button>`);
$downloadBtn.find(".el-icon-loading").hide();
const data = (_b = (_a = unsafeWindow.__INITIAL_STATE__) == null ? void 0 : _a.pageData) == null ? void 0 : _b.sourceInfo;
if ((data == null ? void 0 : data.sourcePrice) === 0) {
$("#downloadBtn .el-button").first().before($downloadBtn);
$downloadBtn.on("click", async function() {
var _a2;
if (!LoginModal.instance.userData) {
LoginModal.instance.show();
LoginModal.instance.notify.warning("请先登录");
return;
}
const params = {
fileId: data.sourceId,
type: data.fileType,
name: data.title,
/** @type {string} */
description: data.description.substr(0, 512),
title: data.title,
size: data.fileSize,
url: location.origin + location.pathname,
// path: '/files/' + dayjs().format('YYYY-MM-DD') + '/' + data.sourceId + '.' + data.fileType,
author: data.sourceAuthor,
// platform: PLATFORM_TYPE.CSDN,
price: data.sourcePrice,
score: data.sourceScore,
uploadTime: data.pubDate
};
$downloadBtn.attr("disabled", "disabled").addClass("is-loading").find(".el-icon-loading").show();
$downloadBtn.find(".logo-icon").hide();
try {
const res = await sourceGetUrl(params);
(_a2 = LoginModal.instance) == null ? void 0 : _a2.showInfo();
if (res.success) {
const resData = res.data;
console.log(resData);
const a = document.createElement("a");
a.href = resData.url;
a.download = [data.title, data.fileType].join(".");
a.click();
Toast.show("搜寻成功,正在为您下载!");
} else if (res.code === 400) {
Active.show();
Active.instance.notify.warning("您的下载积分不足,请充值后再使用", 5e3);
} else {
Toast.show(res.message);
}
} catch (error) {
Toast.show("文件资源搜寻失败,后台已记录,正在扩大搜索范围");
} finally {
$downloadBtn.removeClass("is-loading").attr("disabled", false).find(".el-icon-loading").hide();
$downloadBtn.find(".logo-icon").show();
}
});
}
}
};
__publicField(_CSDN, "instance", null);
let CSDN = _CSDN;
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 = $("<ul/>").addClass("pre-numbering").hide();
$(this).addClass("has-numbering").parent().append(e);
for (var o = 1; o < t; o++)
e.append($("<li/>").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 $btn = $(this);
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("您的使用时间已到,需要续期再使用", 5e3);
return;
}
if (CSDN.instance.loading) {
return;
}
if ($content.hasClass("rendered")) {
LoginModal.instance.notify.success("已解锁全部内容");
Toast.show("已解锁全部内容");
return;
}
$btn.addClass("btn-loading");
CSDN.instance.loading = true;
try {
const res = await getArticle({ url: location.origin + location.pathname, type: "plugin", title: $("#articleContentId").text() });
if (res.success) {
$content.html(res.data);
(_a = document.querySelector("#article_content")) == null ? void 0 : _a.removeAttribute("style");
$content.addClass("rendered");
setTimeout(() => {
markdown_line();
createMenu($content);
$content.find("pre").each(function(t, e) {
var _a2;
e = $(e);
const code = e.find("code");
code.hasClass("hljs") && ((_a2 = hljs == null ? void 0 : hljs.lineNumbersBlock) == null ? void 0 : _a2.call(hljs, code[0])) || (hljs == null ? void 0 : hljs.highlightElement(code[0]));
code.append(`<div class="hljs-button signin" data-title="复制"></div>`), code.height() > 340 ? (e.addClass("set-code-hide"), e.append('<div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="' + blogStaticHost + "dist/pc/img/newCodeMore" + skinStatus + '.png" alt="" title=""></span></div>')) : 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();
});
} else {
Toast.show(res.message || "此文章查询失败,已添加记录,请稍后重试!");
}
} catch (error) {
Toast.show("网络连接失败,请稍后重试!");
} finally {
CSDN.instance.loading = false;
$btn.removeClass("btn-loading");
}
}
CSDN.instance = new CSDN();
const _LoginModal = class _LoginModal {
constructor() {
__publicField(this, "template", template$2);
__publicField(this, "logTp", `<div class="log-info">当前版本:{{ version }}</div>`);
__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<HTMLDivElement>} */
__publicField(this, "$el", null);
/** @type {JQuery<HTMLDivElement>} */
__publicField(this, "$spirit");
/** @type {Notify} */
__publicField(this, "notify", null);
/** @type {Dialog} */
__publicField(this, "dialog", null);
__publicField(this, "_insert", false);
__publicField(this, "_isShow", true);
if (_LoginModal.instance) {
return _LoginModal.instance;
}
getConfig({ key: "goodsQr,goodsUrl,goodsTip,activeTip,greeting,ctemp,version" }).then((res) => {
if (res.success) {
this.configList = res.data || [];
this.render2buy();
}
});
const dom = $(`${this.template}`);
const version = this.version();
if (version) {
this.logDom = $(stringTemplate(this.logTp, { version }));
dom.append(this.logDom);
}
this.$el = dom;
this.dialog = new Dialog();
this.dialog.append(dom);
this.notify = new Notify();
this.$el.append(this.notify.$el);
this.show();
this.renderSpirit();
this.initLoginEvents();
if (getToken()) {
this.showInfo(getStore("user"));
}
}
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() {
var _a;
if (window !== top) return;
(_a = this.$spirit) == null ? void 0 : _a.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();
}
showLogin(msg) {
var _a;
removeToken();
this.show();
this.$el.find("form").show();
this.userData = null;
removeStore("user");
(_a = this.$info) == null ? void 0 : _a.remove();
this.$info = null;
this.notify.close();
msg && this.notify.error(msg, 3e3);
}
hide() {
var _a, _b;
(_a = this.dialog.$el) == null ? void 0 : _a.hide();
(_b = this.$spirit) == null ? void 0 : _b.show();
this._isShow = false;
}
async showInfo(userData) {
try {
if (userData) {
this.renderInfo(userData);
if (Date.now() - (userData.saveTime || 0) < 3 * 60 * 60 * 1e3) {
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) {
console.error(error);
this.showLogin((error == null ? void 0 : error.message) || "获取用户信息失败");
}
}
async renderInfo(data) {
var _a;
this.userData = data;
(_a = this.$info) == null ? void 0 : _a.remove();
const infoDom = $(stringTemplate(infoHtm, data));
this.$el.append(infoDom);
this.$info = infoDom;
this.$el.find("form").hide();
this.render2buy();
this.initInfoEvent();
const exDate = new Date(data.expirationDate).getTime();
const s = exDate - Date.now();
this.expirationTime = s;
if (!data.email) {
this.notify.warning("正在以游客身份使用,<span class='span-btn'>去登陆</span>", 0);
this.notify.$el.find(".span-btn").on("click", () => {
this.notify.info("请及时登录!", 3e3);
this.showLogin();
});
return;
} else if (s <= 0) {
this.notify.info("您的会员已到期,请续费再使用!", 0);
} else if (s <= 3 * 864e5) {
this.notify.info("您的会员即将到期,请及时续期!", 0);
} else {
this.notify.success("欢迎使用qk插件", 0);
}
this.hide();
}
render2buy() {
var _a;
if (this.renderConfig) return;
const urlConfig = this.getConfig("goodsUrl");
if (urlConfig == null ? void 0 : urlConfig.value) {
this.$el.find(".to-buy").attr("href", urlConfig.value).show();
} else {
this.$el.find(".to-buy").hide();
}
const greeting = this.getConfig("greeting");
if ((greeting == null ? void 0 : greeting.value) && this.$info && this.expirationTime > 3 * 864e5) {
this.notify.success(greeting == null ? void 0 : greeting.value, 0);
}
const ctemp = this.getConfig("ctemp");
if (ctemp == null ? void 0 : ctemp.value) {
this.$el.find(".temp").show().find(".c_temp").on("click", async () => {
const res = await userTemp();
setToken(res.data);
this.showInfo();
});
}
const version = this.version();
const lastVersion = (_a = this.getConfig("version")) == null ? void 0 : _a.value;
if (version2Obj(version).v < version2Obj(lastVersion).v) {
const updateUrl = GM_info.scriptUpdateURL;
this.logDom.append(stringTemplate(`,<span>最新版本:<a target="_blank" href="{{updateUrl}}">{{ lastVersion }}</a></span>`, { updateUrl, lastVersion }));
}
if (this.configList.length) {
this.renderConfig = true;
}
}
getConfig(key) {
return this.configList.find((item) => item.key === key);
}
renderSpirit() {
this.$spirit = $(`<div class="spirit-qk-icon">${loginSvg}</div>`).appendTo(document.body).on("click", () => {
this.$spirit.hide();
this.show();
}).hide();
}
initInfoEvent() {
const { $el } = this;
CSDN.csdnDetail && $el.find(".jx").show().on("click", CSDN.csdnDetail);
$el.find(".to-active").on("click", () => {
Active.instance = new Active();
Active.instance.show();
});
}
downCountClose() {
if (!this._isShow) return;
if (!this.userData) return;
this.__closeTimer = setTimeout(() => {
this.hide();
}, 3e3);
}
async submit() {
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((error == null ? void 0 : error.message) || "登录失败", 3e3);
}
}
async sendCode(email) {
try {
const res = await sendVerifyCode({ destination: email, verificationType: "email" });
if (res.success) {
this.time = 60;
this.downCount(this.$el.find(".code-send"));
this.notify.success("验证码发送成功", 3e3);
} else {
this.notify.warning(res.message, 3e3);
}
} catch (error) {
this.$el.find(".code-send").attr("disabled", false);
this.notify.error((error == null ? void 0 : error.message) || "发送验证码失败", 3e3);
}
}
/**
* 倒计时
* @param {JQuery<HTMLElement>} 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<HTMLElement>} 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);
}
version() {
var _a;
return (_a = GM_info == null ? void 0 : GM_info.script) == null ? void 0 : _a.version;
}
};
/** @type {LoginModal} */
__publicField(_LoginModal, "instance", null);
let LoginModal = _LoginModal;
class ZhiHu {
constructor() {
__publicField(this, "config", {
hideOBtn: false
});
this.init();
}
init() {
const that = this;
this.ImgObs = new IntersectionObserver((entries) => {
if (entries[0].intersectionRatio <= 0) return;
const src = entries[0].target.dataset.actualsrc;
if (!src) return;
const img = entries[0].target;
entries[0].target.src = src;
this.ImgObs.unobserve(entries[0].target);
const dom = img.nextElementSibling;
if (dom == null ? void 0 : dom.classList.contains("richText-img-placeholder")) {
dom.remove();
}
});
const domOb = new MutationObserver((mon) => {
mon.find((m) => {
for (let i = 0; i < m.addedNodes.length; i++) {
const $el = $(m.addedNodes[i]);
const PaidAnswerFooter2 = $el.hasClass("KfeCollection-PaidAnswerFooter") ? $el : $el.find(".KfeCollection-PaidAnswerFooter");
if (PaidAnswerFooter2.length) {
that.generateMoreBtn(PaidAnswerFooter2);
return;
}
}
});
});
domOb.observe(document.body, {
subtree: true,
childList: true
});
const PaidAnswerFooter = $(".KfeCollection-PaidAnswerFooter");
if (PaidAnswerFooter.length) {
that.generateMoreBtn(PaidAnswerFooter);
}
}
/**
* 点击阅读全文的时候添加按钮
* @param {JQuery<HTMLDivElement>} dom
*/
generateMoreBtn(PaidAnswerFooter) {
const $moreBtn = $(`<a class="qk-openvippay" style="margin-top: 10px;">
<i class="logo-icon">${loginSvg}</i><span>解锁全文</span>
<i class="iconfont icon-loading"></i>
</a>`);
PaidAnswerFooter.find(".KfeCollection-PurchaseBtn").append($moreBtn);
const contentItem = PaidAnswerFooter.closest(".ContentItem");
const oBtn = PaidAnswerFooter.find(".KfeCollection-PurchaseBtn-HybridLink");
this.config.hideOBtn && oBtn.parent().hide();
$moreBtn.on("click", () => {
this.$content = contentItem;
this.url = contentItem.children("meta[itemprop=url]").attr("content");
this.zhihuDetail($moreBtn, PaidAnswerFooter);
});
}
async zhihuDetail($btn, footer) {
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 (this.loading) {
return;
}
const $article = this.$content.find(".RichText");
if (this.$content.hasClass("rendered")) {
LoginModal.instance.notify.success("已解锁全部内容");
return;
}
$btn.addClass("btn-loading");
this.loading = true;
let zop = this.$content.attr("data-zop");
try {
zop = JSON.parse(zop);
} catch (error) {
}
try {
const res = await getArticle({ url: this.url, type: "plugin", title: zop == null ? void 0 : zop.title });
if (res.success) {
const div = document.createElement("div");
div.innerHTML = res.data.styles;
let fontname = res.data.styles.match(/font-family:([^;]+)/)[1];
$(div).insertBefore($article);
const _content = $(res.data.manuscript);
$article.replaceWith(_content);
_content.css("font-family", `${fontname},-apple-system,BlinkMacSystemFont, 'Helvetica Neue','PingFang SC','Microsoft YaHei', 'Source Han Sans SC','Noto Sans CJK SC','WenQuanYi Micro Hei', sans-serif`);
this.imgLazyLoad(_content[0]);
footer.hide();
this.$content.addClass("rendered");
this.loading = false;
} else {
Toast.show(res.message || "此文章查询失败,已添加记录,请稍后重试!");
}
} catch (error) {
Toast.show("网络连接失败,请稍后重试!");
} finally {
$btn.removeClass("btn-loading");
this.loading = false;
}
}
imgLazyLoad(content) {
const imgs = content.querySelectorAll("img");
imgs.forEach((img, i) => {
this.ImgObs.observe(img);
});
}
}
__publicField(ZhiHu, "instance", null);
ZhiHu.instance = new ZhiHu();
getStore("agree");
LoginModal.instance = new LoginModal();
})();