()
| 150 | |
| 151 | // 快捷回到顶部(右键两侧空白处) |
| 152 | function backToTop() { |
| 153 | if (!GM_getValue('menu_backToTop')) return |
| 154 | document.querySelectorAll('#react-layout>div, #react-layout>div>div, section[data-testid=sidebar]').forEach(ele => { |
| 155 | ele.oncontextmenu = function(e) { |
| 156 | if (e.target == this) { |
| 157 | e.preventDefault(); |
| 158 | window.scrollTo(0,0); |
| 159 | } |
| 160 | } |
| 161 | }) |
| 162 | } |
| 163 | })(); |
nothing calls this directly
no outgoing calls
no test coverage detected