K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmBookmarksFile

Submitted by: desga2



Notes:

This macro open your current bookmarks file in a page (layer). This macro can be used to search qickly a bookmark link with 'Find in page' option (Ctrl+F). The new option created is named 'Open Bookmarks file in page' and it's included in 'Bookmarks' menu.




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

BookmarksFile.kmm

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

# ---------- Custom menu: BookmarksFile -------------------------------------------
#
# Dependencies        : Bookmarks Plugin
# Resources        : -
# Preferences        : -
#
# ---------------------------------------------------------------------------------

$_BookmarksFile_path="";

_BookmarksFile_Default{
$_BookmarksFile_path=getfolder(ProfileFolder);
$_BookmarksFile_path=$_BookmarksFile_path."\\bookmarks.html";
}

_BookmarksFile_Open{
$_BookmarksFile_path=getpref(string,kmeleon.plugins.bookmarks.bookmarkFile);
$_BookmarksFile_path=="" ? &_BookmarksFile_Default : 0;
# To open in current layer:
#open($_BookmarksFile_path);
# To open in new layer:
opennew($_BookmarksFile_path);
# To open in background layer:
#openbg($_BookmarksFile_path);
}


# ----- PRIVATE

BookmarksFile_BuildMenu{
$kBookmarks==true?setmenu("&Bookmarks",macro,"Open &Bookmarks file in page",_BookmarksFile_Open,4):0;
$kBookmarks==true?setmenu("&Bookmarks",separator,5):0;
}


$OnInit=$OnInit."BookmarksFile_BuildMenu;";

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


Comments & Questions

K-Meleon

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