Talk about add-ons and extension development.
<a href="http://forums.mozillazine.org/viewtopic.php?p=569586#569586">As promised</a>:
http://www-jcsu.jesus.cam.ac.uk/~jg307/ ... tliner.xpi
<li>Doesn't work well with scrollable elements on the page (iframes, <code>overflow:scroll</code> elements, frames, etc.)</li>
<li>Doesn't update after the page finishes loading (I'm not quite sure what to do about this - should, I suppose, listen for changes in the document but I'd need a significantly more refined approach to updating the outline - at the momennt I just tear everything down and rebuild it)</li>
Last edited by jgraham on July 20th, 2004, 5:25 am, edited 1 time in total.
I should add that this is Firefox with new EM only. Also Issue 1 above just means that I haven't implemented code to scroll anything other than the main window - it won't break any pages I've used the extension a little and it's pretty useful
I can't believe this hasn't gotten more attention.
This is an excellent idea, and it is well implemented. I was specifically looking for something like this, and I just registered to say thanks.
This really should get some more "promotion".
Keep up the good work.
New version, same URL.
Several fixes for annoying bugs (doesn't interfere with browser chrome, always gets the full outline).
Doesn't listen for DOM mutation events so won't update after the document loads
Doesn't load the outline untill the whole document has finished loading (if anyone knows how to tell when the DOM has finished loading even if the other resources such as images haven't, this wll be fixed soon. Otherwise I'll implement imcremental updating and fix both issues together).
Feedback welcome, I'd like to put this on update.mozilla.org soon, so it would be good to know if there are any bugs (other than the two listed) that need attention.
How would you go about 'incremental updating' ?
URIid needs to know when it's got a body to attach an id / classes to, but at present has to make do with onload which means a wait for images and the like.
sorry, but what does it do?
Well the idea I had was to start trying to load when the location bar changes (i.e. on the call to nsIWebProgress::onLocationChange). At that poiint you'd set a timeout interval equal to the users paint delay (with some sutiable minimum if their paint delay is 0 or really small). On each callback requery the document for new elements and add them if appropriate. Stop this when the DOM is finished loading or when the whole document has finished loading.
Does that sound reasonable?
Sorry, it's not very obvious. It adds a 'Document Outline' entry to View - Sidebar (you can also use Alt+O). This displays the outline of the document in a panel. The outline is based on any heading tags (<h1> to <h6>) present. If the document doesn't have any heading tags (e.g. Mozillazine forums) then it doesn't do anything useful. If the document uses heradings well, it provides a useful way of navigating the document (like the Outline view in MS Word or the similar feature in Acrobat Reader).
That's a very nice and useful extension. Thanks!
On long and complex documents, it would be useful to be able to collapse all and expand all in the outline. Perhaps you could add a dropdown menu similar to the view menu in the History sidebar.
In looking at a number of sites, I'm somewhat saddened by how few properly use headings. It's a little confusing that the Outliner doesn't always show the heading depth. For example, if I have document with h3 followed by h2 followed by h1, they show up as if they are all at the same level in the outline. That doesn't seem quite correct, but then the markup is quite confused as well. I guess I'm wanting the outline to more clearly show how broken the markup is.
Well, in that case, I could do something like:
But I'm not sure that's an improvement, since you end up with a lot of superflous entries. Hmm...
Possibly, I don't know enough about load events, that's why I asked.
on before page load listener - in use in a development version of URIid (fires too soon : ] *)
So it just needs that paint delay thingy .. ?
* hence interest in a listener for a <body> ...
I'm using the same copied code
Well strictly, the delay can be anything, not just the paint delay - the paint delay seems logical as a minimum since the screen won't update more often than that. Something like:
Sorry, the indentation sucks. In your case, you probably want to cancel the timer as soon as you have a body to hook onto and you probably don't care about tab-switching events.
This is a most excellent extension, jgraham. I definitely appreciate the work people do on extensions like this (and hope I'll get the hang over writing extensions eventually to start writing and contributing my own!) I use W3's outliner all the time, and this'll save my time (since I'm on a dial-up connection) as well as W3's bandwidth (which I'll immediately use on validating various web sites just to could the errors =P )
but I would love it if you would update this extension for FF 1 PR .1
It worked fine with 0.93- but wont run now.
please update it :O) it is a handy extension for use in additional testing of sites I develop to make sure they have sensible structure
Who is online
Users browsing this forum: No registered users and 0 guests