MCPcopy Create free account
hub / github.com/XIU2/UserScript / quickReply

Function quickReply

V2ex-Enhanced.user.js:344–356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342
343 // 快速回复(双击左右两侧空白处)
344 function quickReply() {
345 document.getElementById('Wrapper').ondblclick = document.querySelector('#Wrapper > .content').ondblclick = function(event){
346 if (event.target==this) {
347 if (document.querySelector('.box.reply-box-sticky')) {
348 document.getElementById('undock-button').click();
349 } else {
350 let _top = document.body.scrollTop + document.documentElement.scrollTop;
351 document.getElementById('reply_content').focus();
352 window.scrollTo(0,_top);console.log(_top);
353 }
354 }
355 }
356 }
357
358
359 // 新标签页打开链接

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected