
http://projects.edgewall.com/python-sidebar/
 | 安装了以后可以很方便的在浏览器里查看Python文档,更有趣的是他的安装函数。 点击安装以后他只是在收藏夹多了一个链接,但点击后,却是用sidebar打开 ,看这个链接的属性,发现他钩中了Load this bookmark in the sidebar选项,他的安装函数如下: function addMozillaPanel() { if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) { window.sidebar.addPanel ("Python Sidebar", " http://projects.edgewall.com/python-sidebar/html/toc-tutorial.html",""); } else { alert ("Sorry - you must be running Mozilla or Netscape to install this"); } } 关键是 window.sidebar.addPanel这个函数,当然,这个函数只能在mozila类浏览器使用。
|
Trackback: http://tb.donews.net/TrackBack.aspx?PostId=621313