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

# ------------------------------------------ Video Saver ----------------------------
# ------ Easy get links to download embedded videos from Youtube and other services:
# ----------- Vimeo =//= Facebook =//= Twitter =//= Vid.me =//= Musical.ly =//= TED
# ----------- Instagram =//= Flickr =//= VEVO =//= Dailymotion =//=  Tumblr
# ----------- Vine =//= Twitch =//= College Humor =//= Apple Trailers =//= Adobe TV
# ----------- SoundCloud =//= Metacafe =//= Mixcloud =//= VK.com =//= HowCast
#
# Author:	Matt (c) macro for flashvideodownloader service
# Adapted:	rodocop (c) use Savedeo and Dredown services instead FVD
# Version:	1.0 Pro 
# Date:		31/03/2017
# Forum: 	http://kmeleonbrowser.org/forum/read.php?9,125122 
#------------------------------------------------------------------------------------

savvs{
menugrayed=(hostname($URL)=="");
$OpenURL="https://savedeo.com/download?url=".$URL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

savvs_2{
menugrayed=(hostname($LinkURL)=="");
$OpenURL="https://savedeo.com/download?url=".$LinkURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

savvs_3{
menugrayed=(hostname($LinkURL)=="");
$OpenURL="https://savedeo.com/download?url=".$FrameURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

rutubevs{
menugrayed=(hostname($URL)!="rutube.ru");
$OpenURL="http://www.dredown.com/rutube?url=".$URL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

rutubevs_2{
menugrayed=(hostname($LinkURL)!="rutube.ru");
$OpenURL="http://www.dredown.com/rutube?url=".$LinkURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

rutubevs_3{
menugrayed=(hostname($LinkURL)=="rutube.ru");
$OpenURL="http://www.dredown.com/rutube?url=".$FrameURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

howcastvs{
menugrayed=(hostname($URL)!="www.howcast.com");
$OpenURL="http://www.dredown.com/howcast?url=".$URL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

howcastvs_2{
menugrayed=(hostname($LinkURL)!="www.howcast.com");
$OpenURL="http://www.dredown.com/howcast?url=".$LinkURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

howcastvs_3{
menugrayed=(hostname($LinkURL)=="www.howcast.com");
$OpenURL="http://www.dredown.com/howcast?url=".$FrameURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

twittervs{
menugrayed=(hostname($URL)!="twitter.com");
$OpenURL="http://www.dredown.com/twitter?url=".$URL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

twittervs_2{
menugrayed=(hostname($LinkURL)!="twitter.com");
$OpenURL="http://www.dredown.com/twitter?url=".$LinkURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

twittervs_3{
menugrayed=(hostname($LinkURL)=="twitter.com");
$OpenURL="http://www.dredown.com/twitter?url=".$FrameURL;
$ExecMacros="OpenURL_InNew";
&ExecMacros_Frames;
}

savvs_BuildMenu{
setmenu("&Pro",popup,VideoSaver,-1);
setmenu(VideoSaver,macro,"VideoSaver",savvs);
setmenu(VideoSaver,macro,"Rutube Saver",rutubevs);
setmenu(VideoSaver,macro,"Howcast Saver",howcastvs);
setmenu(VideoSaver,macro,"Twitter Saver",twittervs);
setmenu("Page Pro Services",macro,"VideoSaver",savvs);
setmenu("Page Pro Services",macro,"Rutube Saver",rutubevs);
setmenu("Page Pro Services",macro,"Howcast Saver",howcastvs);
setmenu("Page Pro Services",macro,"Twitter Saver",twittervs);
setmenu("Link Pro Services",macro,"VideoSaver",savvs_2);
setmenu("Link Pro Services",macro,"Rutube Saver",rutubevs_2);
setmenu("Link Pro Services",macro,"Howcast Saver",howcastvs_2);
setmenu("Link Pro Services",macro,"Twitter Saver",twittervs_2);
setmenu("Frame Pro Services",macro,"VideoSaver",savvs_3);
setmenu("Frame Pro Services",macro,"Rutube Saver",rutubevs_3);
setmenu("Frame Pro Services",macro,"Howcast Saver",howcastvs_3);
setmenu("Frame Pro Services",macro,"Twitter Saver",twittervs_3);
}

savvs_BuildToolbar{
$savvs_Tooltip=_("VideoSaver");
pluginmsg(toolbars,"AddToolbar","VideoSaver,16,16","");
$savvs=(pluginmsg(toolbars,"AddButton","VideoSaver,savvs,macros("."savvs"."),VideoSaver,".$savvs_Tooltip.",16,16,"."flashvideodownloader.bmp[1],flashvideodownloader.bmp[0]",""));
}

$OnInit=$OnInit."savvs_BuildMenu;";
$OnSetup=$OnSetup."savvs_BuildToolbar;";
# ---------------------------------------------------------------------------------
$macroModules=$macroModules."videosaver;";