Toggle Links
Posted by: morfana
Date: April 04, 2011 12:49AM

https://addons.mozilla.org/en-us/firefox/addon/link-toggler/

Can you adapt this addon to K-Meleon ? I tried to convert with xpi converter but it doesn`t have .jar file. I don`t know how to do it. I will be glad if someone make it. smiling smiley

Re: Toggle Links
Posted by: Matt
Date: April 04, 2011 01:14AM

Well, if I understand correctly all you have to do is highlight a link or part of it, then move the cursor elsewhere and select 'copy' from mouse right-click - that's all, no extension needed.

Re: Toggle Links
Posted by: morfana
Date: April 04, 2011 01:32AM

Just copy `me` not whole text

You need to copy all then paste it to somewhere then copy what you want . Not that i want. This google chrome`s extension`s is same. You will understand what i mean.

https://chrome.google.com/extensions/detail/pihmbjnaeenimjokcejnenhppigofjdi



Edited 1 time(s). Last edit at 04/04/2011 01:34AM by morfana.

Re: Toggle Links
Posted by: siria
Date: April 04, 2011 02:49AM

Can't believe it - just extracted the suspicious looking middle part of the "overlay.js" script from the FF extension, the part between "var links" and "ontoolbarbutton", saved it as file and executed it as bookmarklet with the javascriptia macro - and it simply works, right away!! *shocked*

Not bad that script, really... cudos!
There's nothing changeable in it, so it can easily be written in a macro and added to some KM menu, preferably link context I guess.
But am not doing it without checking permissions first and at the moment don't have enough time left. Perhaps the next days... if allowed...

Or perhaps such a thing exists long since in KM extensions too??

Re: Toggle Links
Posted by: morfana
Date: April 04, 2011 04:10AM

Quote
siria
Or perhaps such a thing exists long since in KM extensions too??

I couldn`t find it or it doesn`t exist. It would be nice if you can make an extension for KM. Thanks.

Re: Toggle Links
Posted by: disrupted
Date: April 07, 2011 05:17AM

i don't think similar one exists, if siria can make the inject macro we can repack as 7z

Re: Toggle Links
Posted by: siria
Date: April 07, 2011 05:56AM

Am currently working to make a slightly different (and independant) macro, that toggles only the current link and re-toggles automatically. Partly works, just two little probs yet, one of them being that re-toggling must be done manually if js is blocked, grmpf... ;-) (setTimeout seems not in the exceptions for macrolanguage)

Re: Toggle Links
Posted by: JamesD
Date: April 07, 2011 07:45AM

@ morfana

This is just a quick/rough way to copy part of a link. You do not have to provide a place to output the original and re-copy part of the link. You do have to delete the characters before and after portion that you wish to retain. The results are in the clipboard so that you can paste them wherever you need.

Directions

Highlight the link. Right click beside the link. Choose "Copy link text".

CopyStr.kmm

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#  
# ---------- CopyStr.kmm
#
# Dependencies        : - main.kmm, 
# Resources           : - 
# Preferences         : -  
# Version             : - 0.1   2011_04_06
# --------------------------------------------------------------------------------

_CopyStr_GSelect {
macroinfo = _("Copy selected link text to clipboard.");
id(ID_EDIT_COPY );
$_CopyStr_text =  getclipboard() ;
$_CopyStr_Return = prompt( $_CopyStr_text , "Delete extra characters" , $_CopyStr_text ); 
setclipboard( $_CopyStr_Return );
statusbar("The clipboard contains:: ".getclipboard() );
}

_CopyStr_ModMenu {
setmenu("SelectedText",macro,_("Copy link text"),"_CopyStr_GSelect",-1);
}

# - - - - - - - - - - - - - - - - - - - - - - 
$OnInit=$OnInit."_CopyStr_ModMenu;";
$macroModules=$macroModules."CopyStr;";


Re: Toggle Links
Posted by: morfana
Date: April 07, 2011 09:06AM

yo, thanks a lot. Both ways work.

Re: Toggle Links
Posted by: siria
Date: April 09, 2011 06:54AM

New macro here smiling smiley

http://kmeleon.sourceforge.net/forum/read.php?9,115867

The function and code is rather different now, except just two lines of JS.



Edited 1 time(s). Last edit at 04/09/2011 06:54AM by siria.

K-Meleon forum is powered by Phorum.