Improvement requests :  K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary. 
Linkification
Posted by: Deodar
Date: March 05, 2006 09:35PM

I really grew accustomed to this extension in Firefox,dynamic links might've been a
better title.If this was compatible with Meleon it would be closer to full functionality,
lots of other plug ins/extensions which make Firefox slower would be welcome
imports to this as well.I guess the trade off is Speed/Function, as this is a very
slick browser.Some sofware,particularly download managers,don't integrate into
Meleon either,I just uninstalled IDM as a consequence.

Options: ReplyQuote
Re: Linkification
Posted by: Fred
Date: March 06, 2006 08:34AM

Have you tried the macro "Go to URL" in the
right-click context menu ?
Just mark the text adress and click "Go to URL", to
go to the website. This comes very close to the
Linkification extension.
It is generally quite difficult to make a Firefox
extension work in K-Meleon, and has only been made possible
in AdBlock, NoScript , Aggreg8, Flashblock and ActiveX Support.
But many extensions are already included in the form
of built-in macros in K-Meleon.
Fred

Options: ReplyQuote
Re: Linkification
Posted by: Drahken
Date: March 07, 2006 09:09PM

Nearly all download managers can be made to work with KM, they just require some special steps. First off, they rarely install themselves to KM, so you have to manually copy the npWHATEVER.dll file into KM's plugins folder. That will work 90% of the time. On the occaisions that it doesn't, you can edit the macros.cfg and menus.cfg files and add "download with..." to the context menu, and point it to the prog you want to use. You can then right click a link and choose "download with getright" or whatever.

Selecting the text of the url and right clicking and choosing go to url is an extra step, but is otherwise the same as linkification. It also has an advantage over linkification in that you can choose to only go to a partial address. For example, lets say a link points to site.com/directory/file.jpg, but you just want to go to site.com or site.com/directory. With linkification, you would have to go to that specific file, and then mess with the url in the address bar to go the site or directory. With go to url, you can simply highlight as much of the url you are interested in and jump straight to site.com.

Most extensions can be made to work with KM, but they require extensive hacking to do so (adblock being a perfect example). Few (if any) extensions can just be installed to KM. The reason is the XUL. Most of the XUL was removed from KM to make it as fast as it is, but extensions require XUL. In theory, a programmer could make any extension work with KM, but they would have to add in extra XUL which isn't normally present in KM, and that would reduce KM's speed.

Hmm... I wonder.... Would it be possible to repack extensions in such a way that they would not only install themselves, but also whatever extra XUL is requied to run them?

Options: ReplyQuote
Re: Linkification
Posted by: bst82551
Date: March 08, 2006 02:44AM

It sounds possible. You would just have to have all of the right files and make sure that they don't accidentally install an extension into an incompatible or outdated build.
I usually just extract the .xpi archives directly into the K-Meleon folder and I can usually get extensions working... I've only done this with maybe two extensions, but it has worked for both. I know one of them was Adblock. I think the other was IEtab.
Of course, you have to delete the .rdf files in the chrome folder and xpti.dat and compreg.dat in the components folder. You also have to add the proper lines to installed-chrome.txt. So, it's a fairly simple process... but that has only worked with a few extensions, as you said before.

Brian

Options: ReplyQuote
Re: Linkification
Posted by: alsanan
Date: August 22, 2007 10:45PM

I have installed GreaseMeleon and by means of the next script, the http:// text links get linkified automatically.

// ==UserScript==
// @name Linkify
// @namespace http://youngpup.net/userscripts
// @description Looks for things in the page that look like URLs but aren't hyperlinked, and converts them to clickable links.
// @include *
// ==/UserScript==

(function () {
const urlRegex = /\b(https?:\/\/[^\s+\"\<\>]+)/ig;

// tags we will scan looking for un-hyperlinked urls
var allowedParents = [
"abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "body",
"caption", "center", "cite", "code", "dd", "del", "div", "dfn", "dt", "em",
"fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "i", "iframe",
"ins", "kdb", "li", "object", "pre", "p", "q", "samp", "small", "span", "strike",
"s", "strong", "sub", "sup", "td", "th", "tt", "u", "var"
];

var xpath = "//text()[(parent::" + allowedParents.join(" or parent::") + ") and " +
"contains(translate(., 'HTTP', 'http'), 'http')]";

var candidates = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

var t0 = new Date().getTime();
for (var cand = null, i = 0; (cand = candidates.snapshotItem(i)); i++) {
if (urlRegex.test(cand.nodeValue)) {
var span = document.createElement("span");
var source = cand.nodeValue;

cand.parentNode.replaceChild(span, cand);

urlRegex.lastIndex = 0;
for (var match = null, lastLastIndex = 0; (match = urlRegex.exec(source)); ) {
span.appendChild(document.createTextNode(source.substring(lastLastIndex, match.index)));

var a = document.createElement("a");
a.setAttribute("href", match[0]);
a.appendChild(document.createTextNode(match[0]));
span.appendChild(a);

lastLastIndex = urlRegex.lastIndex;
}

span.appendChild(document.createTextNode(source.substring(lastLastIndex)));
span.normalize();
}
}
var t1 = new Date().getTime();
//alert((t1 - t0) / 1000);

})();

Options: ReplyQuote
Re: Linkification
Posted by: beta tester
Date: March 19, 2008 06:25PM

this one works for getright(based on IE)
(please change the location path to where your getright is installed)confused smileyave in macros folder(*.kmm)

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Getright download manager ---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go), sendto.kmm (menus)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------

GR_OpenPage{
$_GR_Open=$URL; &_GR_Open;
}
GR_OpenLink{
$_GR_Open=$LinkURL; &_GR_Open;
}
GR_OpenImage{
$_GR_Open=$ImageURL; &_GR_Open;
}
GR_OpenURL{
$__text=$URLBAR; $__text==""?$__text=$URL:0;
$_GR_Open=$__text; &_GR_Open;
}

# ----- PRIVATE

_GR_Open{
# fallback command line (may fail on NT):
$_GR=sub("%s",_("Program Files"),"\"J:\\PROGRA~1\\PROGRA~1\\GETRIG~1\\getright.exe\" %1");
# PATCH (invalid IE7 registry data)
index($__data,".")>index($__data,"%1")?$__data="\"J:\\PROGRA~1\\PROGRA~1\\GETRIG~1\\getright.exe\" %1":0;
# PATCH
$__data==""?0:$_GR=$__data; exec(sub("%1",$_GR_Open,$_GR));
}

_GR_BuildMenu{
index($macroModules,";SendTo;")>-1?&_GR_BuildMenu_SendTo:&_GR_BuildMenu_Default;
}
_GR_BuildMenu_Default{
$__m="Open In &Getright";
setmenu(DocumentOpenExternal,macro,$__m,GR_OpenPage);
setmenu(LinkOpenExternal,macro,$__m,GR_OpenLink);
#setmenu(ImageOpenExternal,macro,$__m,GR_OpenImage);
setmenu(_Go_Open,macro,$__m,GR_OpenURL);
}
_GR_BuildMenu_SendTo{
$__m="&Download Manager";
setmenu($_SendTo_Page,macro,$__m,GR_OpenPage);
setmenu($_SendTo_Link,macro,$__m,GR_OpenLink);
#setmenu($_SendTo_Image,macro,$__m,GR_OpenImage);
setmenu($_SendTo_URL,macro,$__m,GR_OpenURL);
}
_GR_SetAccels{
setaccel("CTRL ALT I","macros(GR_OpenPage)");
}
$OnInit=$OnInit."_GR_SetAccels;_GR_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."GR;";

Options: ReplyQuote
Re: Linkification
Posted by: beta tester
Date: March 19, 2008 06:26PM

same as getright, but links to firefox(change location path of firefox to your own)

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Firefox ---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go), sendto.kmm (menus)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------

FF_OpenPage{
$_FF_Open=$URL; &_FF_Open;
}
FF_OpenLink{
$_FF_Open=$LinkURL; &_FF_Open;
}
FF_OpenImage{
$_FF_Open=$ImageURL; &_FF_Open;
}
FF_OpenURL{
$__text=$URLBAR; $__text==""?$__text=$URL:0;
$_FF_Open=$__text; &_FF_Open;
}

# ----- PRIVATE

_FF_Open{
# fallback command line (may fail on NT):
$_FF=sub("%s",_("Program Files"),"\"G:\\APPLIC~1\\Firefox\\firefox.exe\" %1");
# PATCH (invalid IE7 registry data)
index($__data,".")>index($__data,"%1")?$__data="\"G:\\APPLIC~1\\Firefox\\firefox.exe\" %1":0;
# PATCH
$__data==""?0:$_FF=$__data; exec(sub("%1",$_FF_Open,$_FF));
}

_FF_BuildMenu{
index($macroModules,";SendTo;")>-1?&_FF_BuildMenu_SendTo:&_FF_BuildMenu_Default;
}
_FF_BuildMenu_Default{
$__m="Open In &Browser Plus-FF";
setmenu(DocumentOpenExternal,macro,$__m,FF_OpenPage);
setmenu(LinkOpenExternal,macro,$__m,FF_OpenLink);
#setmenu(ImageOpenExternal,macro,$__m,FF_OpenImage);
setmenu(_Go_Open,macro,$__m,FF_OpenURL);
}
_FF_BuildMenu_SendTo{
$__m="&Browser Plus:firefox";
setmenu($_SendTo_Page,macro,$__m,FF_OpenPage);
setmenu($_SendTo_Link,macro,$__m,FF_OpenLink);
#setmenu($_SendTo_Image,macro,$__m,FF_OpenImage);
setmenu($_SendTo_URL,macro,$__m,FF_OpenURL);
}
_FF_SetAccels{
setaccel("CTRL ALT I","macros(FF_OpenPage)");
}
$OnInit=$OnInit."_FF_SetAccels;_FF_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."FF;";

Options: ReplyQuote


K-Meleon forum is powered by Phorum.