Sunday, 15 July 2007

The implement of "Index This Link"

The browser element : A frame which is expected to contain a view of a Web document.
(From http://www.xulplanet.com/references/elemref/ref_browser.html)
In firefox extension we usually use this element to load an document in the background.
I implement "Index This Link" using browser element.
How ?
  1. When the menu item is clicked , we
    • get the link URL
    • open a new window chrome://newbeagle/content/indexLink.xul , and pass URL and current window element as arguments
  2. When chrome://newbeagle/content/indexLink.xul is loaded.
    • init beagleInvisibleBrowser with opener. (the window which this window)
    • load the passed URL
  3. once the URL is loaded.
    • call winodw.opener.beagle.indexIt with the load document .
In this way, the linked document is indexed just like I loaded it in a new tab , and then "index this page ".
Another problem , why open a new window ?
  • We can't put a browser element in the status bar / toolbar or any other place using overlay. So We have put open a new window , and put a browser element in it . (not visible,of course).
  • We should let user know that we are downloading something. And also it may take some time , We must allow the user to see the process and cancel it .

Sunday, 27 May 2007

Coding time is coming!

Tomorrow is May, 28th. Coding time is coming.
What I have already done:
  • Preference Window design and implement
  • exclude / include rule design (domain,wild card and regular expression)
  • preference save / load implement ( using json format)
What to do next (in next week):
  • Other UI design and implement (context menu,toolbar/status bar icon)
  • index html pages
  • make it runable (pack it as XPI)

Wednesday, 18 April 2007

The preferences window

The preferences dialog.



And the add pattern dialog

Some graphs

Not UML , not MindMap. Just some graphs.






Tuesday, 17 April 2007

exclude or include ?

Exclude or include ?
That is BlackList or WhiteList ?
  • Only BlackList.
    In this way we assume that the user want to index most of the pages.
  • Only WhiteList.
    In this way we assume that the user only want to index only a few pages.
  • Both BlackList and WhiteList
    We assume nothing in this way.
    But there is another problem:
    If an URL matches some rule both in BlackList and WhiteList.
    How to handle it ?BlackList first or WhiteList first ?
  • about UI
    two tabs (one for WhiteList, one for BlackList) or
    one tab for both WhiteList and BlackList
  • save /load
    Save the WhiltList and BlackList to an XML file.
    Load the list from the saved file.
    Maybe I could make it possilbe to load the file in Epiphany Extension.

Friday, 13 April 2007

The Old TODO List

I'm starting reading the code of old Firefox Extension For Beagle.
I found a TODO List in readme.
- make install rule for installing to global extensions
directory (can be done without running mozilla?)
I don't think that is a good idea.
- need better icons
- only index content on initial visit to a page
- send HTTP headers to beagle-index-url?
Is it needed? HTTP headers don't contain much information about the content.
- remove context menu and preferences?
Create a new UI
- improve warnings
- call beagle-index-url with page title and mime-type
Good Idea, same for non-html files
- watch for beagle-index-url error and clean up tempfile
Is it possible ?
- save tempfile in safer place and with better name
Good Idea .
- include install.js for older versions of Firefox (<0.9)
- screenshot webpage
??

Thursday, 12 April 2007

I'm accepted

I'm accepted.
http://code.google.com/soc/beagle/appinfo.html?csaid=C3888F1BDF9F1276
This summer I will work for beagle .
My work is rewriting the browser extensions for beagle.
Thanks beagle . Thanks google.