Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can you edit mouseGestures_uc.js? #47

Closed
akaSM opened this issue Aug 4, 2020 · 2 comments
Closed

How can you edit mouseGestures_uc.js? #47

akaSM opened this issue Aug 4, 2020 · 2 comments

Comments

@akaSM
Copy link

akaSM commented Aug 4, 2020

TL;DR: How can I edit the script to use my own gestures?

I recently installed FF DE and found about this project that allows (among other things) the use of mouse gestures that aren't limited by what web extensions can do, however, the default gestures aren't exactly what I was looking for.

Inside of the script, there's a URL (https://www.cnblogs.com/ziyunfei/archive/2011/12/15/2289504.html) that seems to be a script generator but, it's not working (I tried it with whatever the latest releases of FF DE, Vivaldi, and Waterfox Classic are; as well as FF 40 and even went back as far as 3).

I also tried editing the script itself in Notepad ++ (with 0 knowledge of JS) but whatever I edited stopped working, like this in line 157:

  'L>M': {
    name: 'Duplicate tab',
    cmd: function () {
      gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
    }
  },

That I changed to this:

  'L>M': {
    name: 'Add tab',
    cmd: function () {
      gBrowser.addTab("http://www.google.com/");
    }
  },

It didn't work, that gesture stopped working but the rest of them were fine.

I also tried other scripts, like gomita's from xuldev, but they wouldn't load at all.

@ganego
Copy link

ganego commented Aug 6, 2020

gBrowser.loadOneTab()

@xiaoxiaoflood
Copy link
Owner

You need to know JS so that you understand the code and be able to edit it.

Your addTab code is wrong, you need something like

gBrowser.addTab("http://www.google.com/", { triggeringPrincipal: gBrowser.selectedBrowser.contentPrincipal });

But sorry, I don't have time to help you beyond that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants