Hello Tabulator team.
My name is David Håsäther and I'm currently doing a summer internship at Opera
Software.
I was assigned, by Charles McCathieNevile, to make the Tabulator (v 0.7) work
as a widget in Opera.
Charles wanted me to write what was needed to make it work in Opera. It wasn't
much at all really. The main issue was the mapURI function in tabulate.js.
Since widgets will throw a security violation error when trying to contact
localhost (as they can make XMLHttpRequest calls to other domains), I'm just
returning the URI directly if the script is run from an Opera widget: if
(window.opera && window.widget) return uri;.
Another issue was with the sources_fetch function in rdf/sources.js. The Mac
version of Opera 9 did, for some reason, not get past the following lines (line
97-108), so I commented them out in the widget version:
if (1==1){
try {
netscape.security.PrivilegeManager.enablePrivilege( "UniversalBrowserRead");
tinfo("Got UniversalBrowserRead");
} catch(e) {
alert("(Please see the Tabulator Help!) Failed to get privilege
UniversalBrowserRead to open "
+uri+ ", " + e);
}
}
try {
netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect");
} catch (e) { alert("couldn't get xp connect"); }
And that's it for the JavaScript. There are some other stuff that needs to be
added to make it work as a widget, e.g. a config XML file and some extra CSS.
There may of course be other bugs that I haven't noticed, but all in all, it
seems to work pretty fine right now.
Cool project by the way, keep up the good work. |