Re: [hatari-devel] Hatari manual internal links problem

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On sunnuntai 23 joulukuu 2012, Thomas Huth wrote:
> schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > It works with Chromium 6.x, but it doesn't work with Konqueror from
> > KDE 4.4.5.
> 
> I am also using that version ... and it was working ok here for the
> first tries, but now that I've tested it again, it also failed
> sometimes. Seems to be a little bit shaky / dependend on how fast the
> page loads. Also Konqueror often seems to cache the old page, so make
> sure that you hit the reload button when you try a new version.
> 
> Anyway, I've changed the toc.js script again with a better fix that is
> less a hack than a real fix now. Please test again.

Thanks, it seems to work fine now!


> > I could write a script that automatically generates the ID attributes
> > for all H tags (and generates index based on those).  Same script
> > could also validate that all internal references are valid.
> 
> For a really proper script, you need to work on the DOM level of the
> document. Only using some regex magic often fails as soon as one line
> is written in a slightly different way - we've had that in the past
> already, with the old bash script for generating the index.

Perl, Python, Ruby etc all have XML/HTML parsing facilities, e.g. Python
has several of them. So doing it at DOM level shouldn't be a problem.
There are also wrapper libraries offering JQuery style APIs to them.


> That's why I really prefer the JavaScript TOC here - it can easily work
> on the DOM level of the document. And it is automatically always up to
> date, without hooks or other magic.

Does your JavaScript script check that all the internal links in
the document use correct (existing) IDs and does it give a warning
if they are not?

 
> > If somebody's going to look porting Hatari to Firebee/MiNT, surely
> > Hatari manual should work (have index) there too.  Is there any
> > Atari browser which support JavaScript? :-)
> 
> Draconis supports JavaScript according to their web page.

The download page doesn't have any pointer to the Browser:
	http://draconisatari.sourceforge.net/download.html

Where I can get it?


> Anyway, we're not living in the 1990s anymore. JavaScript is now a real
> wide-spread standard, and as long as the documents are at least
> basically viewable without JavaScript (for w3m etc.), I don't think we
> really have to have this "oh, but I want to view this document
> including the TOC on my stoneage browser here" discussion, do we?
>
> Or do you also want to replace the screenshots that we have in the
> manual with ASCII art, just in case that somebody uses a browser that
> does not support images?

No.  Some console based browsers support showing images and image support
has been in HTML since v1.0 I think.

While almost all modern browsers have a GUI option for turning JavaScript
off, I don't think any of them to have option for turning images off.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/