kfm-devel Digest, Vol 69, Issue 12

Vikram vikram.ramchandran at gmail.com
Tue Dec 16 03:55:18 GMT 2008


I am not looking for help with Tiddlywikki. I am using it without any issues 
with Firefox. I am looking for documentation/help to enhance ti
ddlywikki so that it works with Konqueror. Currently the file opens but cant 
save changes to local disk like in IE and Firefox.

I cant find any documentation on javascript specific to Konqueror. Is there any 
equivalent way to access Konqueror classes using javascript ?

The following code is used to save files in Firefox:
-------------------------------------------------------
// Returns null if it can't do it, false if there's an error, true if it saved 
OK
function mozillaSaveFile(filePath,content)
{
        if(window.Components) {
                try {
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        var file = 
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
                        file.initWithPath(filePath);
                        if(!file.exists())
                                file.create(0,0664);
                        var out = 
Components.classes["@mozilla.org/network/file-output-
stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
                        out.init(file,0x20|0x02,00004,null);
                        out.write(content,content.length);
                        out.flush();
                        out.close();
                        return true;
                } catch(ex) {
                        return false;
                }
        }
        return null;
}


>
> Vikram wrote:
> > I am trying to see if I can use Konqueror to view and save tiddlywiki
> > (http://www.tiddlywiki.com/). When I try and save it I get an error that
> > it cant be saved using Konqueror. I checked the javascript and tried to
> > paste Mozilla specific code below. Is there similar functionality
> > available under Konqueror ? Code sample would be great !
>
> Please note that this is not a help list.
>
> Did you download the file:
>
> 	http://www.tiddlywiki.com/empty.zip
>
> and unzip it?  Does it work when you open: "empty.html" in Konqueror?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20081215/f7df1594/attachment.htm>


More information about the kfm-devel mailing list