Error in Tip 18 on conkeror.org/Tips

View: New views
2 Messages — Rating Filter:   Alert me  

Error in Tip 18 on conkeror.org/Tips

by Michael Zeller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I had trouble with "18. Remember the last save directory for downloads",
the fix was to change default_directory.path to get_home_directory();
and add a semicolon after the add_hook call, see below.

Also, how do I edit the Wiki for User Tips? I made an account, but page
is Immutable. Any way to add comments to a page? =)

//** remember save directory
// http://conkeror.org/Tips#Rememberthelastsavedirectoryfordownloads
{
   let _save_path = get_home_directory();

   function update_save_path(info) {
       _save_path = info.target_file.parent.path;
   }

   add_hook("download_added_hook", update_save_path);

   suggest_save_path_from_file_name = function (filename, buffer) {
       let file = make_file(_save_path);
       file.append(filename);
       return file.path;
   };
}

Hope this helps,
~Michael Zeller
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: Error in Tip 18 on conkeror.org/Tips

by Deniz Dogan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/8/6 Michael Zeller <michael.dylan.zeller@...>:
> Also, how do I edit the Wiki for User Tips? I made an account, but page
> is Immutable. Any way to add comments to a page? =)

You should be able to edit it by clicking "Edit" in the lower left or
right corner of the page, after logging in.

--
Deniz Dogan
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror