Mercurial > nightly_tester_tools
view chrome/content/screenshot/providers.js @ 4:8aa443d1e395 default tip
revised Makefile
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 02 Dec 2008 20:55:06 +0900 |
parents | 472a16863ecc |
children |
line wrap: on
line source
var Providers = { _providers: [], _selected: null, addProvider: function(provider) { this._providers.push(provider); if (this._selected == null) this._selected = provider; }, selectProvider: function(provider) { this._selected = provider; }, getSelectedProvider: function() { return this._selected; }, getProviders: function() { return this._providers; } } var ImageShack = { addFormFields: function(formdata) { formdata.addControl("uploadtype", "on"); formdata.addControl("url", "paste image url here"); formdata.addControl("MAX_FILE_SIZE", "3145728"); formdata.addControl("refer", ""); formdata.addControl("brand", ""); formdata.addControl("optsize", "320x320"); }, getFileFormField: function() { return "fileupload"; }, getReferer: function() { return "http://www.imageshack.us/"; }, getSubmissionURL: function() { return "http://www.imageshack.us/"; } } var AllYouCanUpload = { addFormFields: function(formdata) { formdata.addControl("images[0].submittedPhotoSize", "100%"); formdata.addControl("imagesCount", "1"); }, getFileFormField: function() { return "images[0].fileName"; }, getReferer: function() { return "http://allyoucanupload.webshots.com/"; }, getSubmissionURL: function() { return "http://allyoucanupload.webshots.com/uploadcomplete"; } } Providers.addProvider(ImageShack); //Providers.addProvider(AllYouCanUpload);