Siigh.. Would love to, and already have an old personal macro for much the same purpose (except regex, but not absolutely necessary) - but too busy still with other stuff and other unfinished macros
Knowing JamesD, he's perhaps almost finished again with a new one... :cool:
Anyway, in case it takes same time - would recommand to login and follow this thread to get email notices.
And I read this like you guys are willing and able to code your own special replacements, by editing the kmm directly, just based on some syntax examples :cool: And of course can ask for help in the forum anytime, just not get a comfortable GUI.
-----------------------
example:
http://imgur.com/XXXXXX => http://i.imgur.com/XXXXXX.jpg
myredirects_method1{
$_site=hostname($URL);
#
if ($_site=="imgur.com") {
$_url=sub("http://imgur","http://i.imgur",$URL)."jpg";
}
if ($_site=="blabla.com") {
$_url=sub...whatever...;
}
if ($_site=="zzzzz.com") {
$_url=sub...whatever...;
}
if (index($URL,".bbb.org/pics/")<20) {
$_url=sub.....whatever...;
$_url=substr($_url,index...)...whatever...;
}
open($_url);
# opentab($_url);
}
myredirects_method2{
if (index($URL,"http://imgur.com/")==0) {
# replace with your own strings here:
injectJS("var x; x=document.href; x=x.replace(/string1/g,'string2'); document.href=x ;");
}
...
}
-----------------------
and the next prob is on how to implement it.
It could either work "OnLoad", that means first the original page is loaded and when finished the redirected is loaded....
Or alternatively it could only be redirected when clicking a menu or button...
Or links could have the redirect option on the right-click menu...
Or could be called via mousegesture...
But what I can not do is a redirect of a link on left-click.
If need be, it could be put at middle-click for links...
Edited 5 time(s). Last edit at 01/08/2016 08:35AM by siria.