// ==UserScript==
// @name qk文章资源共享|CSDN|知乎|专栏|会员文章|盐选|文件下载|CSDN积分
// @namespace https://zsh5.qktk.online/
// @version 0.0.2-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
// @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
// ==/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: "qkfont"; /* Project id 4739727 */
src: url('data:font/woff2;base64,d09GMgABAAAAAATgAAsAAAAACegAAASRAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqHHIYsATYCJAMQCwoABCA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HAAAwABBAkAAAAmAIMAAwABBAkAAQAQAKkAAwABBAkAAgAOALkAAwABBAkAAwAQAMcAAwABBAkABAAQANcAAwABBAkABQAWAOcAAwABBAkABgAQAP0AAwABBAkACgBWAQ0AAwABBAkACwAmAWNDcmVhdGVkIGJ5IGljb25mb250aWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAECAQMBBAEFAAdsb2FkaW5nBWNsb3NlBGhlbHAAAA==') format('truetype');
}
.iconfont {
font-family: "qkfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-loading:before {
content: "\\e891";
}
.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,
.hide-aside,
.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;
}
@keyframes loading {
form {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.icon-loading {
display: none;
}
.btn-loading {
position: relative;
}
.btn-loading:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.55);
border-radius: 20px;
}
.btn-loading .icon-loading {
position: absolute;
display: block;
left: 50%;
top: 0;
color: #f2f2f2;
animation: 0.6s loading linear infinite;
}
@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 = '';
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);
}
delete obj.data;
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 {
if (status === 401) {
LoginModal.instance.showLogin("登录失效,请重新登录");
}
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';
const template = '卡密购买
请用淘宝App扫码购买
';
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();
}
showLogin(msg) {
var _a;
removeToken();
this.show();
this.$el.find("form").show();
this.userData = null;
removeStore("user");
(_a = this.$info) == null ? void 0 : _a.hide();
msg && this.notify.error(msg, 3e3);
}
hide() {
this.dialog.$el.hide();
this.$spirit.show();
this._isShow = false;
}
async showInfo(userData) {
var _a;
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) {
this.showLogin(((_a = error.responseJSON) == null ? void 0 : _a.message) || "获取用户信息失败");
}
}
renderInfo(data) {
this.userData = data;
getConfig({ key: "goodsQr,goodsUrl,goodsTip,activeTip,greeting" }).then((res) => {
if (res.success) {
this.configList = res.data || [];
this.render2buy();
}
});
if (!this.$info) {
const infoDom = $(stringTemplate(infoHtm, data));
this.$el.append(infoDom);
this.$info = infoDom;
}
this.$el.find("form").hide();
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();
this.immersionRead();
}
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 = $(`
隐藏
侧栏
显示
侧栏
`);
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(`博
`);
} 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 $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("您的使用时间已到,需要续费再使用");
return;
}
if (CSDN.instance.loading) {
return;
}
$btn.addClass("btn-loading");
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;
$btn.removeClass("btn-loading");
}
}
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);
getStore("agree");
LoginModal.instance = new LoginModal();
})();