mirror of
https://github.com/XIU2/UserScript.git
synced 2026-09-07 11:27:41 +00:00
update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 吾爱破解论坛增强 - 自动签到、翻页
|
||||
// @version 1.1.1
|
||||
// @version 1.1.2
|
||||
// @author X.I.U
|
||||
// @description 自动签到、自动无缝翻页
|
||||
// @match *://www.52pojie.cn/*
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
|
||||
qianDaoBack(); // 先看看是不是签到跳转页面,如果是则返回
|
||||
qianDao(); // 看看有没有签到
|
||||
//qianDao(); // 看看有没有签到
|
||||
pageLoading(); // 自动翻页
|
||||
|
||||
|
||||
@@ -148,11 +148,10 @@
|
||||
|
||||
// 签到后立即返回
|
||||
function qianDaoBack() {
|
||||
var qiandaoback = document.querySelector('#messagetext p.alert_btnleft a');
|
||||
if (qiandaoback){
|
||||
if(location.href === "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2")
|
||||
{
|
||||
setTimeout(`qiandaoback.click()`, 300);
|
||||
if(location.href === "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2"){
|
||||
var qiandaoback = document.querySelector('#messagetext p.alert_btnleft a');
|
||||
if (qiandaoback){
|
||||
setTimeout(function(){qiandaoback.click()}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,6 +173,29 @@
|
||||
}
|
||||
|
||||
|
||||
// 监听 XMLHttpRequest 事件
|
||||
function EventXMLHttpRequest() {
|
||||
var _send = window.XMLHttpRequest.prototype.send
|
||||
function sendReplacement(data) {
|
||||
if(this.onreadystatechange) {
|
||||
this._onreadystatechange = this.onreadystatechange;
|
||||
}
|
||||
this.onreadystatechange = onReadyStateChangeReplacement;
|
||||
return _send.apply(this, arguments);
|
||||
}
|
||||
function onReadyStateChangeReplacement() {
|
||||
if(this._onreadystatechange) {
|
||||
if (this.readyState==4 && this.status==200)
|
||||
{
|
||||
console.log('111111111111111111111111111111111111111')
|
||||
}
|
||||
}
|
||||
return this._onreadystatechange.apply(this, arguments);
|
||||
}
|
||||
window.XMLHttpRequest.prototype.send = sendReplacement;
|
||||
}
|
||||
|
||||
|
||||
var ShowPager = { // 修改自 https://greasyfork.org/scripts/14178
|
||||
getFullHref: function (e) {
|
||||
if(e == null) return '';
|
||||
|
||||
+16
-4
@@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 知乎增强
|
||||
// @version 1.1.3
|
||||
// @version 1.1.4
|
||||
// @author X.I.U
|
||||
// @description 一键收起回答、置顶显示时间、区分问题文章
|
||||
// @match *://www.zhihu.com/*
|
||||
@@ -272,6 +272,7 @@ function addTypeTips() {
|
||||
patt_tip = /zhihu_e_tips/
|
||||
var postList = document.querySelectorAll('h2.ContentItem-title a');
|
||||
postNum = document.querySelectorAll('small.zhihu_e_tips');
|
||||
console.log(`${postList.length} ${postNum.length}`)
|
||||
if (postList.length > postNum.length){
|
||||
for(var num = postNum.length;num<postList.length;num++){
|
||||
if (!patt_tip.test(postList[num].innerHTML)){ // 判断是否已添加
|
||||
@@ -289,6 +290,17 @@ function addTypeTips() {
|
||||
}
|
||||
}
|
||||
|
||||
// 监听 XMLHttpRequest 事件
|
||||
function EventXMLHttpRequest() {
|
||||
var _send = window.XMLHttpRequest.prototype.send
|
||||
function sendReplacement(data) {
|
||||
addTypeTips();
|
||||
return _send.apply(this, arguments);
|
||||
}
|
||||
window.XMLHttpRequest.prototype.send = sendReplacement;
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
//折叠谢邀
|
||||
let timer=setInterval(function(){
|
||||
@@ -328,12 +340,12 @@ function addTypeTips() {
|
||||
}else if(window.location.href.indexOf("search") > -1){ // 搜索结果页 //
|
||||
collapsedAnswer(); // 一键收起回答
|
||||
setInterval(topTime_search, 300); // 置顶显示时间
|
||||
setInterval(addTypeTips, 1000); // 区分问题文章
|
||||
EventXMLHttpRequest(); // 区分问题文章
|
||||
}else if(window.location.href.indexOf("topic") > -1){ // 话题页 //
|
||||
if(window.location.href.indexOf("unanswered") == -1){
|
||||
collapsedAnswer(); // 一键收起回答
|
||||
setInterval(topTime_search, 300); // 置顶显示时间
|
||||
setInterval(addTypeTips, 1000); // 区分问题文章
|
||||
EventXMLHttpRequest(); // 区分问题文章
|
||||
}
|
||||
}else if(window.location.href.indexOf("zhuanlan") > -1){ // 文章 //
|
||||
setInterval(topTime_zhuanlan, 300); // 置顶显示时间
|
||||
@@ -346,6 +358,6 @@ function addTypeTips() {
|
||||
}else{ // 首页 //
|
||||
collapsedAnswer(); // 一键收起回答
|
||||
setInterval(topTime_index, 300); // 置顶显示时间
|
||||
setInterval(addTypeTips, 1000); // 区分问题文章
|
||||
EventXMLHttpRequest(); // 区分问题文章
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user