There is a problem $LinkURL is an only read Global variable, we can't modify it.
but you can try to do this in code after addlink:
$_reloadfile="";
$LinkURL==""?0:$_reloadfile=gsub(":", "", $LinkURL);
alert($_reloadfile, "DEBUG", INFO);
$LinkURL==""?0:$_reloadfile=gsub("/", "-", $_reloadfile);
alert($_reloadfile, "DEBUG", INFO);
$LinkURL==""?exec("cmd.exe /q /c del \"".$_favdir."\\.url\""):exec("cmd.exe /q /c del \"".$_favdir."\\".$_reloadfile.".url\"");
This delete the .url file but the URL link still in Favorites menu (as a ghost Favorite). Ghost Favorites are deleted when K-Meleon is restarted.
If you do a click in a free space of page, link focus is lost (blur) and Reload in Favorites work fine because $LinkURL is an empty string ("").
I tried this line:
injectJS("function removeFocusOnAllLinks(){for(var i=0 ; i < document.links.length ; i++) document.links.onfocus=blurLink;} function blurLink() {if (this.blur) this.blur();} removeFocusOnAllLinks();");
without positive results.
I'm trying to simulate this click in page (document.focus()) in JavaScript, without good results to now.
K-Meleon in Spanish