Changeset 12079
- Timestamp:
- 05/20/08 23:58:17 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/ex_autocmd.js
r9439 r12079 1 1 // Vimperator plugin: 'Ex Autocmd' 2 // Last Change: 14-Apr-2008. Jan 20082 // Last Change: 20-May-2008. Jan 2008 3 3 // License: Creative Commons 4 4 // Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid … … 8 8 // TabSelect 9 9 // TabLeave 10 // CurrentPageLoad 10 11 11 var recentTab = null;12 var recentTabURI = null; 12 13 function tabSelect(e){ 13 14 liberator.autocommands.trigger("TabSelect",gBrowser.selectedTab.linkedBrowser.contentWindow.location.href); 14 liberator.autocommands.trigger("TabLeave",recentTab && recentTab.linkedBrowser.contentWindow?recentTab.linkedBrowser.contentWindow.location.href:"");15 recentTab = gBrowser.selectedTab;15 liberator.autocommands.trigger("TabLeave",recentTabURI ? recentTabURI : ""); 16 recentTabURI = gBrowser.selectedTab.linkedBrowser.contentWindow.location.href; 16 17 } 17 18 gBrowser.tabContainer.addEventListener("TabSelect",tabSelect,false); 19 20 21 function currentPageLoad(e){ 22 var doc = e.originalTarget; 23 if (doc instanceof HTMLDocument && doc == gBrowser.contentDocument){ 24 liberator.autocommands.trigger("CurrentPageLoad",doc.documentURI); 25 recentTabURI = doc.documentURI; 26 } 27 } 28 gBrowser.addEventListener("load", currentPageLoad, true); 29
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)