View Single Post
  #1 (permalink)  
Old 12-02-2007, 07:44 AM
hachu
Status: Offline
Senior Member
 
Join Date: Jul 2007
Posts: 151
Rep Power: 13
hachu will become famous soon enough
Default [MobileSafari] File Download plug-in

So, I got curious after work one day and decided to figure out how to write a simple MobileSafari plugin. This took me 3 days.

This one lets you download most zip and tar files. I tried to make it download png, gif, and jpgs, but because Safari handles it already, I don't think I can ever make that work.

This was developed targeting 1.0.2. I haven't tried it on 1.1.1 or 1.1.2.
(Updated) XianLi says in this thread that it works fine for him on 1.1.2.

No warranty or liability of any kind, of course. Don't blame me if it somehow messes up your data, though it isn't supposed to affect anything outside the Downloads folder it created.

How to use:
Copy the plugin bundle into "/System/Library/Internet Plug-Ins", and then reboot the phone.
It will create a folder called Downloads next to Library and Media in your root home folder. It will only download there.

When you click on a link that is downloadable, a large button will appear. Click on it to download. Click the normal page back button to not download, or to go back when it's complete.

http://www.badongo.com/file/5544413

Update: Version 0.2 posted.
New to 0.2: Progress bar. Basic instructional text. Allow user to choose name to save as.
Features tried and failed: Percentage and KB/sec as text. I have the value as a variable, NSString simply fails to display it correctly on 1.0.2.

Anything else I want to say cuz you're still reading:
Yes, it looks kinda ugly.
Please don't post any requests for other plugins in this thread. That's a good sign for me to ignore you.
Like any other projects I do publicly, whether or not I continue to improve it is based off how much time I have outside of work, whether or not I feel like working on it, and the quality of feedback I get. (seeing stupid posts with awful use of punctuation and no real content or irrelevant content makes me lose interest fast, seeing high quality posts like "By the way, if I do this, this, and this, it crashes. I think you might have forgot to check if such and such value happens to be blank" makes me feel appreciated because you're showing to me you actually care and are trying to be constructively helpful.)

Last edited by hachu; 12-11-2007 at 07:00 AM. Reason: Updated for 0.2.
Reply With Quote
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92