K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmOnlyVideo

Original code by: Fred
Submitted by: desga2



Notes:

This macro open only YouTube videos without javascript.


Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder
(Edit > Configuration > Macros) and create the following text files:

OnlyVideo.kmm

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

# ---------- Only Youtube videos without JS ----------------------------
#
# Dependencies        : main.kmm
# Resources        : -
# Preferences        : -
#
# ----------------------------------------------------------------------

Only_video{
$_video_addres="";
$_video_addres=gsub("watch?","",$LinkURL);
$_video_addres=gsub("=","/",$_video_addres);
opennew($_video_addres);
}

# ----- PRIVATE

_Only_video_BuildMenu{
# Link Popup context menu
$__m=_("Open Only &Video");
setmenu(LinkOpenExternal,macro,$__m,Only_video);
}

$OnInit=$OnInit."_Only_video_BuildMenu;";

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


Comments & Questions

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.