GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: siria
Date: February 22, 2010 06:43AM

To use *1* mouse gesture for different actions depending on context.

This is not a separate tool, it's using the native K-Meleon mouse-gesture plugin, just expanding its possibilities by allowing different actions if the mouse starts from a LINK, or from an IMAGE, or whether there is some text SELECTED anywhere, or whether the mouse is just somewhere else on the PAGE.
You can at any time set a "single" gesture again with the normal KM mouse gestures menu. And if some time later you open the GesturePlus-Menu and enable one of the commands there (multi-up etc.), the previous "single" action will be backed up in a pref, so that it can be toggled back and forth between single- and multi-gestures. It's all stored in "about:config" page. Sort of a little brother of addons like DragToGo, except horrible customization, sorry ;-/

The 4 main directions are fully pre-configured, the 4 diagonal ones are there too but with "0" for commands. All you can exchange of course.

Don't worry not to remember so many different actions, actually the ones for "UP" and "DOWN" I find really quite intuitive smiling smiley (much more than the others grinning smiley)





DOWNLOAD v1.0 as .7z: http://www.datafilehost.com/download-d44506cd.html
Allow cookies, open link, then left-click on "here".
This is the 7z-file for the KEM-extensions manager, includes also an ini-file, helpfile and a screenshot. Can also be added without the manager, just unzip it into your K-Meleon folder and restart browser (KEM does the same, just a little more comfortable).

----------------------

Pre-configured are:

*** Gesture 'UP' does on:
SELECTED TEXT: Open selection as URL in new page
LINKS: Open link in new page
IMAGE: Zoom it bigger
PAGE: Go to top of page
ABOUTCONFIG page: Open some info links for pref settings (Mozilla etc.)

*** Gesture 'DOWN' does on:
SELECTED TEXT: Open selection as URL in Background
LINKS: Open link in background
IMAGE: Zoom it smaller
PAGE: Go to bottom of page (and if you like, on certain forums automatically a bit higher again)

*** Gesture 'RIGHT' does on:
SELECTED TEXT: Search selected text in your default search engine
LINKS: Save target as...
IMAGE: Open in new tab
PAGE: Go Forward

*** Gesture 'LEFT' does on:
SELECTED TEXT: Search selected text in translators and/or Wikipedia etc.
LINKS: Add link to bookmarks
IMAGE: View image properties
PAGE: Go Back

Information about the chosen actions can be read in the statusbar when hovering the mouse over the menu entries.

EDIT: Oops, the "left" is giving me a little headaches, should have tested more, but can't fix it before tomorrow evening! Any beta-testers...? cool smiley



Edited 3 time(s). Last edit at 02/22/2010 07:07AM by siria.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: disrupted
Date: February 25, 2010 03:00AM

siria, i can hardly use regular gestures let alone plus version..so i couldn't test it to find out if it's completely bug free or doesn't conflict with other things.

if you can assure me it's working fine, i'll add it under enhancements

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: siria
Date: February 25, 2010 03:24AM

Thanks, that would be great! Am just working a bit at it yet (minor improvements) and therefore would prefer to add only the next version, coming very soon.

No there are no real bugs just this little problem that's described in the help and kmm file: If a page has a background image, then no matter where on that page the mouse is hovering, everywhere an ImageURL is present, grmpf! I'm trying to work around that at least partly with a custom setting whether to include or exclude image actions generally, and if someone decides to use them he must bear with the background image vanishing sometimes. For lack of javascript skills that's my not-so-great workaround, hiding the background image via CSS and then checking again for the existence of an ImageURL. Must say though personally I can well live with that ;-)

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: disrupted
Date: February 25, 2010 04:08AM

yes, probably most people who prefer gestures browsing could live with out a bg image in exchange for more gestures. not many sites have a bg image anyway.
i'll wait for version 2 before uploading

by the way, for the uninstall ini, when they are several files inside a folder created by the extension(not a default kmeleon folder).. you don't need to write every file inside that folder for deletion.. just the main folder, because that way it will delete the files and leave the folder empty

for e.g:
2=gestureplus/gestureplus_help.txt
3=gestureplus/gestureplus-menu.png
4=gestureplus/gestures.xml

no need to write every file, just the folder will be enough, this way it will delete the folder with the files inside
2=gestureplus



Edited 1 time(s). Last edit at 02/25/2010 04:37AM by disrupted.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: Jackpots
Date: June 10, 2010 10:39PM

I would like to try this, however, the link appears to be broken. Thanks.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: JackPots
Date: June 25, 2010 05:42AM

For Siria...

Is your extension still available? If so, could you provide another link. Thanks.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: siria
Date: July 05, 2010 02:36AM

Sorry for hesitating so long, but that's one of my macros that I'm not quite happy with yet :-( So no new download link...

Two probs, the configuration is just too complicated and confusing for normal users, and additionally still no workaround found for this really annyoing problem: Impossible to tell for SURE whether the mouse is over a selected text at the moment, or over a link or elsewhere :-( In KM, whenever a link is clicked to open in a new page, it stays highlighted on the old page, no matter what, and that means there exists the variable $LinkURL, no matter where the mouse hovers, grmpf. Same for selected text, whether its behind the mouse or anywhere else on the page, the variable $SelectedText does exist, and unfortunately those variables are all I have to check for, being no programmer, only dabbling with macro language. And googling around long and hard for a javascript didn't help either. That is, there was actually some js command for un-selecting a text and focus ("blur"), but no way in the world to un-FOCUS an old link with it in K-Meleon. Perhaps even a gecko-bug, no idea.
Personally I can live with having to first left-click somewhere on a page to UNselect old links and un-select a text (e.g. highlighted from a page search), if I wanna get the plain-page-gesture, but how many macro-users would put up with that, so often triggering the wrong function because an old link still has the dotted line around it, or there's still some text highlighted from a page search...

Actually in the second version I had created some nice extra-functions that I love (e.g. a command to open several dictionaries at once to look up a selected text, and such stuff), but the whole thing is nowhere near a postable version yet, the code all cluttered. Had gotten too frustrated with that absolutely uncurable linkfocus-bug and at last given up finishing the whole thing at some point :-/

Perhaps some day I'll work at it again, but certainly not soon. If at all :-( Would require to think up a nice default-configuration for multi-gestures, so that at least users could try that thing without struggling with the complicated macro-configuration first. Lots of work, but my other nearly-finished macros (since ages) have higher priority, because those don't contain any unsolvable probs, just need some polishing yet ;-)

Well, sorry :-/

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: JackPots
Date: July 16, 2010 09:59AM

Thanks.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: snuz2
Date: July 16, 2010 11:55AM

@siria
If you mean that the variable is holding a value from an old tab or window, that sounds like an oversight ( meaning bug) on Kmeleon's part. The variable should only reference items in the current tab or window and should be blank when the tab or window is first opened.
Maybe it's possible to capture the tab or window open event in js and reset the variable as a workaround? Maybe with some "tricky" code to make it try to open a null address and then trap the error and ignore it.
Really, each tab/window should have its own variable.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: siria
Date: July 16, 2010 02:41PM

Oh, little misunderstanding, sorry! The variables really are only from the *current* tab or window. The prob is just that there's no way (for me) to make it "forget" e.g. the last clicked link on that page. The one with that little dotted line around it...
The heart of the problem is that I just don't know how to figure out if at this moment the mouse is *hovering* over a link or selection, or if there was only a previously selected one on this page, since it was last loaded. Those variables are only emptied if the user left-clicks somewhere on the page. But either way the variables always refer to the current page only.



Edited 3 time(s). Last edit at 07/16/2010 02:48PM by siria.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: snuz2
Date: July 19, 2010 12:41PM

and you used the blur command in js, it "blurred" the "focus" - but the km variable stayed exactly the same, right?



Edited 1 time(s). Last edit at 07/19/2010 12:42PM by snuz2.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: siria
Date: July 19, 2010 02:53PM

It actually kept the focus with the dotted line around the last used link :-( But if you or anyone can give me a script line that actually works for removing that marking (a bookmarklet that works successfully) then I'm rather sure the variable would get emptied too...

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: snuz2
Date: July 20, 2010 03:03AM

i wouldn't be that sure lol - but I will work on it. I used to be js programmer, I know blur worked in KM around v1.1, but I'm not so sure about the variable clearing.

Re: GesturePlus (diff. actions per mouse gesture on links, images, text,...)
Posted by: snuz2
Date: July 22, 2010 01:45PM

okay. did some research. i was somewhat mistaken, i used blur in an application where i used links, but styled to appear as normal text, to control focus in the page text. this does work. but the focus/blur only applies to html objects like buttons, text boxes and such. it has nothing to do with "static text" that appears on the page. the handling of which is browser dependent.

mozilla browsers do have a documented method in js to copy whatever text is selected, which is how the km macro variable gets its information. but there is no documented controls to "release" a highlighted text area in js. unless mozilla documentation includes such a feature, i suppose it is impossible.

another alternative is to simulate a mouseclick in a known safe area of the document to release the highlight, but I don't know of a way to trigger the event, at least through js. and...

not sure how that would help anyway. since presumably you want different behavior depending upon whether the mouse gesture starts within the highlight or not. it is possible to find where the mouse is relative to the page. but standard javascript document object doesn't expose the location of the highlight only the contents. however, searching mozilla might reveal a special interface that's not part of standard js.

why didn't i search mozilla myself? well, they have several documentation sites with similar names and I no longer remember which is the "good" one.

it is possible that although gecko doesn't normally expose the highlight region to js, that it can be added in kmeleon. surely windows knows what part of the window is highlighted and if the mouse is in that region. really, we only need to know if the mousedown event happened in the highlight region.

who cares? well, i think that gesture plus is a really good idea and should be km's standard interface. i'm sure others agree by looking at postings. i say "do not give up" ! if we ask nicely, maybe our developers will be able to expose this information in the next version so that gesture plus will be super capable.

in any case, I only use page up/dn and open fg/bg parts of gesture plus, so i encourage you to release a "lite" version because it's so good.



Edited 1 time(s). Last edit at 07/22/2010 01:47PM by snuz2.

K-Meleon forum is powered by Phorum.