K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmGApplication

Original code by: Thanh Vu (baysao»gmail)
Submitted by: desga2



Notes:

In Firefox, there is sidebar that could use to display useful information. I was hearing in there, people using Google applications (Google Notebook, Gtalk, GReader, GMail, GDocument, GCalendar...) which has built for mobile application to display in sidebar. In K-Meleon, in this moment sidebar isn't, i think about using javascripts to popup small windows to view page contents. That is very similar sidebar in firefox. Very usefuls. Macros make google application more usefuls.
To use this macro, you have to turn off function Popup blocker or add exceptions rule to popup except www.google.com address.


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

GApplication.kmm

# K-Meleon Macros 

(http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Only Youtube videos without JS ----------------------------
#
# Dependencies        :  -
# Resources        : -
# Preferences        : -
#
# ----------------------------------------------------------------------

GNote{
injectJS("NFW=window.open(\"http://www.google.com/notebook/ig?hl=__MSG_locale__\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}
GCalEvent{
injectJS("NFW=window.open(\"http://www.google.com/calendar/m\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}
GCal{
injectJS("NFW=window.open(\"http://www.google.com/calendar/gadget?up_showAgenda=false&upt_showAgenda=hidden&up_calendarFeeds=(%7B%7D)&upt_calendarFeeds=hidden&up_firstDay=0&upt_firstDay=enum&up_dateFormat=0&upt_dateFormat=enum&up_timeFormat=1:00pm&upt_timeFormat=enum&up_calendarFeedsImported=0&upt_calendarFeedsImported=hidden&up_showCalendar2=1&upt_showCalendar2=bool&lang=en&country=us&.lang=en&.country=us&synd=ig&mid=0&parent=&libs=9yKJTwdwCZw/lib/libcore.js,DXEULJSfpLM/lib/libdynamic-height.js,c64nWSZKWFg/lib/libsetprefs.js\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}

GTalk{
injectJS("NFW=window.open(\"http://talkgadget.google.com/talkgadget/client\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}
GMail{
injectJS("NFW=window.open(\"http://m.gmail.com\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}
GDocs{
injectJS("NFW=window.open(\"http://docs.google.com/m\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}
GReader{
injectJS("NFW=window.open(\"http://www.google.com/reader/m/view\",\"popFrameless\",\"scrollbars,width=214,height=398\");NFW.blur();NFW.resizeTo(214,398);NFW.moveTo(260,100);window.focus();NFW.focus()");
}

# ----- PRIVATE
$Gpopup_menu="Google &Application";
_GPopup_BuildMenu{
setmenu($Gpopup_menu,macro,"Google &Notebook",GNote);
setmenu($Gpopup_menu,macro,"Google Calendar &QuickEvent",GCalEvent);
setmenu($Gpopup_menu,macro,"Google &Calendar",GCal);
setmenu($Gpopup_menu,macro,"Google &Talk",GTalk);
setmenu($Gpopup_menu,macro,"Google &Mail",GMail);
setmenu($Gpopup_menu,macro,"Google &Document",GDocs);
setmenu($Gpopup_menu,macro,"Google &Reader",GReader);
setmenu(DocumentSave,popup,$Gpopup_menu);
}
_GPopup_BuildAccel{
setaccel("CTRL ALT N","macros(GNote)");
setaccel("CTRL ALT Q","macros(GCalEvent)");
setaccel("CTRL ALT C","macros(GCal)");
setaccel("CTRL ALT T","macros(GTalk)");
setaccel("CTRL ALT M","macros(GMail)");
setaccel("CTRL ALT D","macros(GDocs)");
setaccel("CTRL ALT R","macros(GReader)");
}
$OnInit=$OnInit."_GPopup_BuildMenu;_GPopup_BuildAccel;";

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


Comments & Questions

K-Meleon

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