Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Toggle Links
Posted by: morfana
Date: April 03, 2011 05:49PM

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

Options: ReplyQuote
Re: Toggle Links
Posted by: Matt
Date: April 03, 2011 06:14PM

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.

Options: ReplyQuote
Re: Toggle Links
Posted by: morfana
Date: April 03, 2011 06:32PM

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/03/2011 06:34PM by morfana.

Options: ReplyQuote
Re: Toggle Links
Posted by: siria
Date: April 03, 2011 07:49PM

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??

Options: ReplyQuote
Re: Toggle Links
Posted by: morfana
Date: April 03, 2011 09:10PM

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.

Options: ReplyQuote
Re: Toggle Links
Posted by: disrupted
Date: April 06, 2011 10:17PM

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

Options: ReplyQuote
Re: Toggle Links
Posted by: siria
Date: April 06, 2011 10:56PM

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)

Options: ReplyQuote
Re: Toggle Links
Posted by: JamesD
Date: April 07, 2011 12: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;";


Options: ReplyQuote
Re: Toggle Links
Posted by: morfana
Date: April 07, 2011 02:06AM

yo, thanks a lot. Both ways work.

Options: ReplyQuote
Re: Toggle Links
Posted by: siria
Date: April 08, 2011 11:54PM

New macro here smiling smiley

http://kmeleonbrowser.org/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/08/2011 11:54PM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.