Opera Browser Mouse Gestures

This script works on any browser and simulates the Opera Browser Mouse Gestures, but with this script you can modify or disable them as you want.

目前為 2021-01-10 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
hacker09
評價
0 0 0
版本
0.0.3
建立日期
2021-01-07
更新日期
2021-01-10
尺寸
5.3 KB
授權條款
未知
腳本執行於
所有網站

If you use the Opera Browser and your mouse gestures are activated follow the steps below before installing the script.
1 Go to Settings.
2 Click Advanced in the left sidebar, and click Browser.
3 Under Shortcuts, turn OFF Enable mouse gestures.

If you want to modify/disable (or add) the mouse gestures start on Line 20 in the script codes.


Here's how to do it.
L = Means Left.
D = Means Down.
U = Means Up.
R = Means Right.

If you want to modify the actual mouse gestures of the script follow this example:
Change this 'L': function() {
to
'DL': function() {

Before the right click+Left would Go Back your browser history, now we've changed Left to Down+Left, so right click+Down+Left will Go Back your browser history from now on.

If you want to disable any of the gestures, you just need to add 2 slashes "//" in front of all the line codes from
//Function that will run when the mouse movement *** is performed
Till
//Finishes the mouse movement ***

Example:
// 'R': function() { //Function that will run when the mouse movement Right is performed
// window.history.forward(); //Go Foward
// }, //Finishes the mouse movement Right

Before the right click+Right mouse gesture would Go Foward your browser history, but now when you do a right click+Right mouse gesture nothing will happen.

If you want to ADD a new mouse gesture follow this example:
Copy and paste the 3 lines below after the line 19 in the script codes, then modify 'UL': function() { with the mouse actions you want.

'UL': function() { //Function that will run when the mouse movement Up+Left is performed
// Here you write the javascript/jquery codes that you want to be executed when the mouse movement Up+Left is performed
}, //Finishes the mouse movement Up+Left

Example of javascript codes to Open the actual website on a New Incognito Window!:
'UL': function() { //Function that will run when the mouse movement Up+Left is performed
GM_openInTab(location.href, { //Open the link
incognito: true, //Open the link on a New Incognito Window
}); //Finishes the GM_openInTab
window.top.close(); //Close the actual tab
}, //Finishes the mouse movement Up+Left


I may or not make these modifications easier to do in the future, install the script so you can be aware of new release updates.




ActionGesture
Go back one pageLeft gestureMove left
Go forward one pageRight gestureMove right
Open a new tabDown gestureMove down
Reload the pageUp down gestureMove straight up, then straight down
Close current tabDown right gestureMove down, then right

Open a link in a background tabDown up gestureMove straight down, then straight up
Open a link in a new tabDown gestureMove down
Open a link in a new windowShift ⇧ + Down gestureMove down, holding shift