Skip to content

Commit da00976

Browse files
committed
优化 代码
1 parent 7410b0c commit da00976

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

52pojie-Enhanced.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
} else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复
179179
curSite = DBSite.youspace;
180180
}
181-
curSite.pageUrl = ""; // 下一页URL
181+
curSite.pageUrl = ''; // 下一页URL
182182

183183
qianDao(); // 自动签到
184184
pageLoading(); // 自动翻页

V2ex-Enhanced.user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
}
208208
}
209209

210-
curSite.pageUrl = ""; // 下一页URL
210+
curSite.pageUrl = ''; // 下一页URL
211211
if(menu_value('menu_fish'))fish(); // 标签页伪装为 Github(摸鱼)
212212
if(menu_value('menu_autoClockIn'))setTimeout(qianDao, 1000); // 自动签到(后台),延迟 1 秒执行是为了兼容 [V2ex Plus] 扩展
213213
if(menu_value('menu_pageLoading'))pageLoading(); // 自动翻页(无缝)
@@ -233,9 +233,9 @@
233233
let timeOld = GM_getValue('menu_clockInTime')
234234
if (!timeOld || timeOld != timeNow) {
235235
qianDaoStatus_(timeNow) // 后台获取签到状态(并判断是否需要签到)
236-
} else { // 新旧签到时间一致
236+
}/* else { // 新旧签到时间一致
237237
console.info('[V2EX 增强] 已经签过到了。')
238-
}
238+
}*/
239239
}
240240
}
241241

@@ -271,7 +271,7 @@
271271
function qianDaoStatus_(timeNow) {
272272
GM_xmlhttpRequest({
273273
url: 'https://www.v2ex.com/mission/daily',
274-
method: "GET",
274+
method: 'GET',
275275
timeout: 5000,
276276
onload: function (response) {
277277
let html = ShowPager.createDocumentByString(response.responseText);
@@ -288,7 +288,7 @@
288288

289289
// 回到顶部(右键左右两侧空白处)
290290
function backToTop() {
291-
document.getElementById("Wrapper").oncontextmenu = document.querySelector("#Wrapper > .content").oncontextmenu = function(event){
291+
document.getElementById('Wrapper').oncontextmenu = document.querySelector("#Wrapper > .content").oncontextmenu = function(event){
292292
if (event.target==this) {
293293
event.preventDefault();
294294
window.scrollTo(0,0)
@@ -321,7 +321,7 @@
321321

322322
// 快速回复(双击左右两侧空白处)
323323
function quickReply() {
324-
document.getElementById("Wrapper").ondblclick = document.querySelector("#Wrapper > .content").ondblclick = function(event){
324+
document.getElementById('Wrapper').ondblclick = document.querySelector('#Wrapper > .content').ondblclick = function(event){
325325
if (event.target==this) {
326326
if (document.querySelector('.box.reply-box-sticky')) {
327327
document.getElementById('undock-button').click();

0 commit comments

Comments
 (0)