// ==UserScript== // @name 鼠标摇滚手势滚动控制 // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description 通过同时按下鼠标左右键并移动来滚动页面 // @author 魂祈梦 // @match *://*/* // @grant GM_registerMenuCommand // @grant GM_getValue // @grant GM_setValue // @grant GM_addStyle // @run-at document-idle // @noframes // @downloadURL https://update.greasyfork.icu/scripts/538393/%E9%BC%A0%E6%A0%87%E6%91%87%E6%BB%9A%E6%89%8B%E5%8A%BF%E6%BB%9A%E5%8A%A8%E6%8E%A7%E5%88%B6.user.js // @updateURL https://update.greasyfork.icu/scripts/538393/%E9%BC%A0%E6%A0%87%E6%91%87%E6%BB%9A%E6%89%8B%E5%8A%BF%E6%BB%9A%E5%8A%A8%E6%8E%A7%E5%88%B6.meta.js // ==/UserScript== (function() { 'use strict'; // 添加全局样式 GM_addStyle(`#rock-scroll-app .rock-scroll-config-panel{z-index:9999;color:#fff;background:linear-gradient(135deg,#1a2a6c,#2c3e50);border:1px solid #6496ff66;border-radius:15px;width:320px;padding:25px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 20px 50px #000000b3}#rock-scroll-app .config-header{text-align:center;border-bottom:1px solid #fff3;margin-bottom:20px;padding-bottom:15px}#rock-scroll-app .config-header h2{color:#4fc3f7;margin:0;font-size:1.8rem}#rock-scroll-app .config-header p{color:#b0b0ff;margin:5px 0 0}#rock-scroll-app .setting-group{background:#000f1e80;border-radius:10px;margin-bottom:20px;padding:15px}#rock-scroll-app .setting-title{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}#rock-scroll-app .setting-title h3{color:#4fc3f7;margin:0;font-size:1.1rem}#rock-scroll-app .value-display{color:#feb47b;text-align:right;min-width:40px;font-weight:700}#rock-scroll-app .slider-container{height:30px;margin-bottom:5px;position:relative}#rock-scroll-app .rock-scroll-slider{-webkit-appearance:none;background:#34495e;border-radius:4px;outline:none;width:100%;height:8px}#rock-scroll-app .rock-scroll-slider::-webkit-slider-thumb{-webkit-appearance:none;cursor:pointer;background:#3498db;border:2px solid #fff;border-radius:50%;width:20px;height:20px;box-shadow:0 0 8px #3498dbb3}#rock-scroll-app .toggle-container{justify-content:space-between;align-items:center;display:flex}#rock-scroll-app .rock-scroll-toggle{width:50px;height:25px;display:inline-block;position:relative}#rock-scroll-app .rock-scroll-toggle input{opacity:0;width:0;height:0}#rock-scroll-app .toggle-slider{cursor:pointer;background-color:#34495e;border-radius:25px;transition:all .4s;position:absolute;top:0;bottom:0;left:0;right:0}#rock-scroll-app .toggle-slider:before{content:"";background-color:#fff;border-radius:50%;width:19px;height:19px;transition:all .4s;position:absolute;bottom:3px;left:3px}#rock-scroll-app input:checked+.toggle-slider{background-color:#00e676}#rock-scroll-app input:checked+.toggle-slider:before{transform:translate(25px)}#rock-scroll-app .config-actions{justify-content:center;gap:15px;margin-top:15px;display:flex}#rock-scroll-app .config-btn{cursor:pointer;border:none;border-radius:30px;min-width:100px;padding:10px 20px;font-size:1rem;transition:all .3s}#rock-scroll-app .save-btn{color:#fff;background:linear-gradient(135deg,#00e676,#00b248);box-shadow:0 3px 8px #00e6764d}#rock-scroll-app .save-btn:hover{background:linear-gradient(135deg,#00f77d,#00c853);transform:translateY(-2px);box-shadow:0 5px 12px #00e67680}#rock-scroll-app .close-btn{color:#fff;background:linear-gradient(135deg,#ff5252,#b71c1c);box-shadow:0 3px 8px #ff52524d}#rock-scroll-app .close-btn:hover{background:linear-gradient(135deg,#ff6b6b,#c62828);transform:translateY(-2px);box-shadow:0 5px 12px #ff525280}#rock-scroll-app .status-indicator{z-index:9998;background:#001428b3;border:1px solid #6496ff4d;border-radius:30px;align-items:center;gap:8px;padding:10px 15px;font-size:.9rem;display:flex;position:fixed;bottom:20px;right:20px}#rock-scroll-app .status-dot{background:#ff5252;border-radius:50%;width:10px;height:10px;box-shadow:0 0 5px #ff5252}#rock-scroll-app .status-dot.active{background:#00e676;box-shadow:0 0 5px #00e676}#rock-scroll-app .success-banner{color:#fff;z-index:9999;opacity:0;pointer-events:none;background:linear-gradient(135deg,#00e676,#00b248);border-radius:30px;padding:12px 25px;transition:opacity .3s;position:fixed;top:20px;left:50%;transform:translate(-50%);box-shadow:0 5px 15px #0000004d}#rock-scroll-app .success-banner.show{opacity:1}#rock-scroll-app .status-indicator{cursor:pointer;transition:background .3s}#rock-scroll-app .status-indicator:hover{background:#001e3ccc}#rock-scroll-app .fixed-item{background:#f8f9fa;border-radius:8px;margin-top:20px;padding:12px 15px}#rock-scroll-app .value{color:#1e88e5;font-weight:700} `); "use strict";(self.webpackChunkmouse_gesture=self.webpackChunkmouse_gesture||[]).push([["203"],{44:function(e,t,n){let r;n.d(t,{$W:()=>m,F3:()=>y,H3:()=>S,LM:()=>M,Py:()=>b,Zw:()=>w,di:()=>F,gQ:()=>v,kr:()=>x,qp:()=>$,so:()=>g,vH:()=>l});let l={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return o(this.context.count)},getNextContextId(){return o(this.context.count++)}};function o(e){let t=String(e),n=t.length-1;return l.context.id+(n?String.fromCharCode(96+n):"")+t}Symbol("solid-proxy"),Symbol("solid-track"),Symbol("solid-dev-component");let s={equals:(e,t)=>e===t},u=V,i={owned:null,cleanups:null,context:null,owner:null};var f=null;let a=null,c=null,d=null,h=null,p=0;function g(e,t){let n=c,r=f,l=0===e.length,o=void 0===t?r:t,s=l?i:{owned:null,cleanups:null,context:o?o.context:null,owner:o},u=l?e:()=>e(()=>w(()=>B(s)));f=s,c=null;try{return H(u,!0)}finally{c=n,f=r}}function v(e,t){let n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},s,t):s).equals||void 0};return[C.bind(n),e=>("function"==typeof e&&(e=e(a&&a.running&&a.sources.has(n)?n.tValue:n.value)),O(n,e))]}function y(e,t,n){N(E(e,t,!1,1))}function b(e,t,n){n=n?Object.assign({},s,n):s;let r=E(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,N(r),C.bind(r)}function w(e){if(null===c)return e();let t=c;c=null;try{return e()}finally{c=t}}function S(e){!function(e,t,n){u=_;let l=E(e,void 0,!1,1),o=r&&$(r);o&&(l.suspense=o),l.user=!0,h?h.push(l):N(l)}(()=>w(e))}function m(e){return null===f||(null===f.cleanups?f.cleanups=[e]:f.cleanups.push(e)),e}let[,A]=v(!1);function x(e,t){var n,r;let l=Symbol("context");return{id:l,Provider:(n=l,function(e){let t;return y(()=>t=w(()=>{f.context={...f.context,[n]:e.value};let t=b(()=>e.children),r=b(()=>(function e(t){if("function"==typeof t&&!t.length)return e(t());if(Array.isArray(t)){let n=[];for(let r=0;r{let e=r();return Array.isArray(e)?e:null!=e?[e]:[]},r}),void 0),t}),defaultValue:e}}function $(e){let t;return f&&f.context&&void 0!==(t=f.context[e.id])?t:e.defaultValue}function C(){let e=a&&a.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)N(this);else{let e=d;d=null,H(()=>j(this),!1),d=e}if(c){let e=this.observers?this.observers.length:0;c.sources?(c.sources.push(this),c.sourceSlots.push(e)):(c.sources=[this],c.sourceSlots=[e]),this.observers?(this.observers.push(c),this.observerSlots.push(c.sources.length-1)):(this.observers=[c],this.observerSlots=[c.sources.length-1])}return e&&a.sources.has(this)?this.tValue:this.value}function O(e,t,n){let r=a&&a.running&&a.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(a){let r=a.running;(r||!n&&a.sources.has(e))&&(a.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&H(()=>{for(let t=0;t1e6)throw d=[],Error()},!1)}return t}function N(e){if(!e.fn)return;B(e);let t=p;k(e,a&&a.running&&a.sources.has(e)?e.tValue:e.value,t),a&&!a.running&&a.sources.has(e)&&queueMicrotask(()=>{H(()=>{a&&(a.running=!0),c=f=e,k(e,e.tValue,t),c=f=null},!1)})}function k(e,t,n){let r,l=f,o=c;c=f=e;try{r=e.fn(t)}catch(t){return e.pure&&(a&&a.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(B),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(B),e.owned=null)),e.updatedAt=n+1,L(t)}finally{c=o,f=l}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?O(e,r,!0):a&&a.running&&e.pure?(a.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function E(e,t,n,r=1,l){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:f,context:f?f.context:null,pure:n};return a&&a.running&&(o.state=0,o.tState=r),null===f||f!==i&&(a&&a.running&&f.pure?f.tOwned?f.tOwned.push(o):f.tOwned=[o]:f.owned?f.owned.push(o):f.owned=[o]),o}function T(e){let t=a&&a.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return j(e);if(e.suspense&&w(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--){if(e=n[r],t){let t=e,l=n[r+1];for(;(t=t.owner)&&t!==l;)if(a.disposed.has(t))return}if((t?e.tState:e.state)===1)N(e);else if((t?e.tState:e.state)===2){let t=d;d=null,H(()=>j(e,n[0]),!1),d=t}}}function H(e,t){if(d)return e();let n=!1;t||(d=[]),h?n=!0:h=[],p++;try{let t=e();return function(e){let t;if(d&&(V(d),d=null),e)return;if(a)if(a.promises.size||a.queue.size){if(a.running){a.running=!1,a.effects.push.apply(a.effects,h),h=null,A(!0);return}}else{let e=a.sources,n=a.disposed;for(let e of(h.push.apply(h,a.effects),t=a.resolve,h))"tState"in e&&(e.state=e.tState),delete e.tState;a=null,H(()=>{for(let e of n)B(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;eu(n),!1),t&&t()}(n),t}catch(e){n||(h=null),d=null,L(e)}}function V(e){for(let t=0;t=0;t--)B(e.tOwned[t]);delete e.tOwned}if(a&&a.running&&e.pure)!function e(t,n){if(n||(t.tState=0,a.disposed.add(t)),t.owned)for(let n=0;n=0;t--)B(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}a&&a.running?e.tState=0:e.state=0}function q(e,t,n){try{for(let n of t)n(e)}catch(e){L(e,n&&n.owner||null)}}function L(e,t=f){let n=e instanceof Error?e:Error("string"==typeof e?e:"Unknown error",{cause:e});!0;throw n}function M(e,t){return w(()=>e(t||{}))}Symbol("fallback");let P=e=>`Stale read from <${e}>.`;function F(e){let t=e.keyed,n=b(()=>e.when,void 0,void 0),r=t?n:b(n,void 0,{equals:(e,t)=>!e==!t});return b(()=>{let l=r();if(l){let o=e.children;return"function"==typeof o&&o.length>0?w(()=>o(t?l:()=>{if(!w(r))throw P("Show");return n()})):o}return e.fallback},void 0,void 0)}},133:function(e,t,n){n.d(t,{$T:()=>c,Oo:()=>a,Qj:()=>i,X$:()=>l,XK:()=>u,ok:()=>f,sY:()=>s});var r=n(44);Object.create(null),Object.create(null);let l=e=>(0,r.Py)(()=>e()),o="_$DX_DELEGATE";function s(e,t,n,l={}){let o;return(0,r.so)(r=>{o=r,t===document?e():c(t,e(),t.firstChild?null:void 0,n)},l.owner),()=>{o(),t.textContent=""}}function u(e,t,n,l){let o,s=()=>{let t=l?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:l?t.firstChild:t.content.firstChild},u=t?()=>(0,r.Zw)(()=>document.importNode(o||(o=s()),!0)):()=>(o||(o=s())).cloneNode(!0);return u.cloneNode=u,u}function i(e,t=window.document){let n=t[o]||(t[o]=new Set);for(let r=0,l=e.length;rr.call(e,n[1],t))}else e.addEventListener(t,n,"function"!=typeof n&&n)}function c(e,t,n,l){if(void 0===n||l||(l=[]),"function"!=typeof t)return p(e,t,l,n);(0,r.F3)(r=>p(e,t(),r,n),l)}function d(e){return!!r.vH.context&&!r.vH.done&&(!e||e.isConnected)}function h(e){if(r.vH.registry&&r.vH.events&&r.vH.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,l=e.target,o=e.currentTarget,s=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),u=()=>{let r=t[n];if(r&&!t.disabled){let l=t[`${n}Data`];if(void 0!==l?r.call(t,l,e):r.call(t,e),e.cancelBubble)return}return t.host&&"string"!=typeof t.host&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},i=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>t||document}),r.vH.registry&&!r.vH.done&&(r.vH.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();s(n[0]);for(let e=0;e{let r=t();for(;"function"==typeof r;)r=r();n=p(e,r,n,l)}),()=>n;else if(Array.isArray(t)){let u=[],f=n&&Array.isArray(n);if(function e(t,n,r,l){let o=!1;for(let s=0,u=n.length;sn=p(e,u,n,l,!0)),()=>n;if(s){if(!u.length)return n;if(void 0===l)return n=[...e.childNodes];let t=u[0];if(t.parentNode!==e)return n;let r=[t];for(;(t=t.nextSibling)!==l;)r.push(t);return n=r}if(0===u.length){if(n=v(e,n,l),i)return n}else f?0===n.length?g(e,u,l):function(e,t,n){let r=n.length,l=t.length,o=r,s=0,u=0,i=t[l-1].nextSibling,f=null;for(;sr-u){let l=t[s];for(;u=0;o--){let s=t[o];if(l!==s){let t=s.parentNode===e;r||o?t&&s.remove():t?e.replaceChild(l,s):e.insertBefore(l,n)}else r=!0}}else e.insertBefore(l,n);return[l]}Symbol()}}]); (()=>{"use strict";var e={392:function(e,t,i){var n=i(44),u=i(133);let r={getConfig:()=>({enabled:GM_getValue("enabled",!0),sensitivity:GM_getValue("sensitivity",5),showIndicator:GM_getValue("showIndicator",!0)}),saveConfig:e=>(GM_setValue("enabled",e.enabled),GM_setValue("sensitivity",e.sensitivity),GM_setValue("showIndicator",e.showIndicator),e),updateConfig:e=>{let t={...r.getConfig(),...e};return r.saveConfig(t)}},s=(0,n.kr)();var l=(0,u.XK)(`
\u{6447}\u{6EDA}\u{624B}\u{52BF}: `);let o=e=>{var t,i,r;let{setShowConfigPanel:o}=(0,n.qp)(s);return(r=(i=(t=l()).firstChild).nextSibling).firstChild,t.$$click=e=>{e.stopPropagation(),o(!0)},(0,u.$T)(r,()=>e.isActive?"激活中":"未激活",null),(0,n.F3)(()=>(0,u.ok)(i,`status-dot ${e.isActive?"active":""}`)),t};(0,u.Qj)(["click"]);let a=e=>{let[t,i]=(0,n.gQ)(!1),u=0,r={left:!1,right:!1},s=t=>{e.config.enabled&&3===t.buttons&&(i(!0),r.left=!0,r.right=!0,t.clientY,u=t.clientY,t.preventDefault())},l=i=>{if(t()&&e.config.enabled){if(r.left&&r.right){let t=i.clientY,n=u-t;u=t,window.scrollBy({top:n*e.config.sensitivity,behavior:"smooth"})}i.preventDefault()}},a=e=>{t()&&(2===e.button?(e.preventDefault(),e.stopPropagation(),r.right=!1):0===e.button&&(r.left=!1))},c=e=>{t()&&(i(!1),e.preventDefault(),e.stopPropagation())};return(0,n.H3)(()=>{document.addEventListener("mousedown",s,!0),document.addEventListener("mousemove",l,!0),document.addEventListener("mouseup",a,!0),document.addEventListener("contextmenu",c,!0)}),(0,n.$W)(()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("mousemove",l,!0),document.removeEventListener("mouseup",a,!0),document.removeEventListener("contextmenu",c,!0)}),(0,n.LM)(n.di,{get when(){return e.config.showIndicator},get children(){return(0,n.LM)(o,{get isActive(){return t()}})}})};var c=(0,u.XK)(`

\u{6EDA}\u{52A8}\u{63A7}\u{5236}\u{8BBE}\u{7F6E}

\u{8C03}\u{6574}\u{9F20}\u{6807}\u{6447}\u{6EDA}\u{624B}\u{52BF}\u{7684}\u{53C2}\u{6570}

\u{6EDA}\u{52A8}\u{7075}\u{654F}\u{5EA6}

\u{63A7}\u{5236}\u{6EDA}\u{52A8}\u{901F}\u{5EA6}\u{FF0C}\u{6570}\u{503C}\u{8D8A}\u{5927}\u{6EDA}\u{52A8}\u{8D8A}\u{5FEB}

\u{542F}\u{7528}\u{6447}\u{6EDA}\u{624B}\u{52BF}

\u{5F00}\u{542F}\u{6216}\u{5173}\u{95ED}\u{9F20}\u{6807}\u{6447}\u{6EDA}\u{624B}\u{52BF}\u{529F}\u{80FD}

\u{663E}\u{793A}\u{72B6}\u{6001}\u{6307}\u{793A}\u{5668}

\u{5728}\u{5C4F}\u{5E55}\u{53F3}\u{4E0B}\u{89D2}\u{663E}\u{793A}\u{5F53}\u{524D}\u{624B}\u{52BF}\u{6FC0}\u{6D3B}\u{72B6}\u{6001}