Google_image_direct{ $_image-google=""; $_image-google=gsub("http://images.google.com/imgres?imgurl=","",$LinkURL); $_image-google=gsub("&imgrefurl*","",$_image-google); opennew($_image-google); }
Quote
[InternetShortcut]
URL=javascriptfunction(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k++){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i); j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https?\:\/\/[^\s]*[^.,;'%22>\s\)\]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if (x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status && window.status.indexOf('://')!=-1)x.href=window.status; x.onmouseout(); } x.onmouseover=null; x.onmouseout=null; }})();
Quote
Changes redirecting links to go directly to the "real" target.
This bookmarklet uses two methods to determine the "real" target of a link.
If the link URL contains another URL, as in h**p://example.net/, the link becomes a link to h**p://example.net/.
If the link has a mouseover effect, and the mouseover effect puts something in the status bar that looks like a full URL, the link gets that URL.
Based on a submission by Michael Roller and a suggestion from Guido Tonini.
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- Google Image Direct ---------------------------- # # Dependencies : main.kmm # Resources : - # Preferences : - # # ---------------------------------------------------------------------- Google_image_direct{ $_image_google=""; $_image_google=gsub("http://images.google.com/imgres?imgurl=","",$LinkURL); $_image_google=gsub("&imgrefurl=http://","?",$_image_google); opennew($_image_google); } # ----- PRIVATE Google_image_direct_BuildMenu{ # Image context menu $__gim=_("Google_image_direct"); setmenu(ImageOpenExternal,macro,$__gim,Google_image_direct); } $OnInit=$OnInit."Google_image_direct_BuildMenu;"; # ----------------------------------------------------------------------- $macroModules=$macroModules."Google_image_direct;";
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- Google Image Extension --------------------------------------------------------------- # # Dependencies : main.kmm # Resources : - # Preferences : - # # ------------------------------------------------------------------------------------------------- # Google Images syntax: # Fred's trick: # $_GImg_URL=gsub("http://images.google.com/imgres?imgurl=","",$LinkURL); # $_GImg_URL=gsub("&imgrefurl=http://","?",$_GImg_URL); # - Google URL constant: #$_GoogleImage="http://images.google.com/imgres?"; # - Image URL: #$_GImageURL="imgurl=http://"; # - Page URL: #$_GPageImage="imgrefurl=http://"; # URL replacements: # %3F="?" $_GI_quest="%3F"; # %3D="=" $_GI_equal="%3D"; # %26="&" $_GI_amp="%26"; # %22="\"" $_GI_quote="%22"; Gimage{ # From first = to first & $_position1=index($LinkURL, "=")+1; $_position2=index($LinkURL, "&"); $_GImg_URL=substr($LinkURL, $_position1, ($_position2-$_position1)); $OpenURL=$_GImg_URL; $OpenURL==""?0:&OpenURL_InNew; } G_PageImage{ # From second = to second & # URL replacements can be needed $_GImg_TMP=sub("=","",$LinkURL); $_position1=index($_GImg_TMP, "=")+1; $_GImg_TMP=substr($LinkURL, 1, $_position1); $_GImg_Page=gsub($_GImg_TMP,"",$LinkURL); $_position2=index($_GImg_Page, "&"); $_GImg_URL=substr($_GImg_Page, 1, $_position2-1); $_GImg_URL=gsub($_GI_quest,"?",$_GImg_URL); $_GImg_URL=gsub($_GI_equal,"=",$_GImg_URL); $_GImg_URL=gsub($_GI_amp,"&",$_GImg_URL); $_GImg_URL=gsub($_GI_quote,"\"",$_GImg_URL); $OpenURL=$_GImg_URL; $OpenURL==""?0:&OpenURL_InNew; } # ----- PRIVATE _Gimage_BuildMenu{ setmenu(ImageOpenExternal,macro,_("View Only GImage"),Gimage,-1); setmenu(ImageOpenExternal,macro,_("View Page GImage"),G_PageImage,-1); } $OnInit=$OnInit."_Gimage_BuildMenu;"; # ------------------------------------------------------------------------------------------------- $macroModules=$macroModules."Google Image;";