1 The [[plugins/toggle]] plugin has no effect when viewed on the Safari web browser.
3 All toggles appear open all the time.
5 I don't know if this is true for other webkit browsers (the new Konqueror, the iPhone, etc).
6 I'm currently testing in the Safari nightly builds, but I've seen the bug in the current release
9 Looking at the Safari Web Inspector, it believes there is a parse error on line 47 of the
10 [[news]] page. This is the definition of the getElementsByClass(class) function.
14 47 function getElementsByClass(class) {
15 SyntaxError: Parse error
16 48 var ret = new Array();
18 > Reproduced in epiphany-webkit on debian.
20 > Also noticed something interesting when I opened the page in vim. It
21 > highlighted the "class" like a type definition, not a variable. Sure
22 > enough, replacing with "c" fixed it.
24 > I wonder if webkit is actually in the right here, and using a reseved
25 > word like, presumably, "class" as a variable name is not legal. As I try
26 > to ignore javascript as much as possible, I can't say. [[done]] --[[Joey]]
28 >> I also started having a look at this. I found the same issue with the
29 >> the variable 'class'. I'm not a javascript guru so I looked on the web
30 >> at other implementations of getElementsByClass() and noticed some
31 >> things that we might use. I took a bunch of different ideas and came
34 function getElementsByClass(cls, node, tag) {
35 if (document.getElementsByClass)
36 return document.getElementsByClass(cls, node, tag);
37 if (! node) node = document;
39 var ret = new Array();
40 var pattern = new RegExp("(^|\\s)"+cls+"(\\s|$)");
41 var els = node.getElementsByTagName(tag);
42 for (i = 0; i < els.length; i++) {
43 if ( pattern.test(els[i].className) ) {
50 >> Most of the changes are minor, except that this one will use the
51 >> built in function if it is available. That is likely to be significantly
52 >> faster. Adding the extra parameters doesn't cause a problem --
53 >> they're filled in with useful defaults.
55 >> I don't know if it is worth making this change, but it is there if you want it.
57 >>> Well, it seems to work. Although god only knows about IE. Suppose I
58 >>> might as well.. --[[Joey]]