old_contents: var widget = uploadcare.Widget('[role=uploadcare-uploader]');
  
  function resize() {
      JFCustomWidget.requestFrameResize({
          width: 618,
          height: 500
      });
  }
  
  JFCustomWidget.subscribe('ready', function(){
      widget.onDialogOpen(function(){
          resize();
      });
      
      uploadcare.start({
        publicKey: 'demopublickey'
      });
  });
  
new_contents: var widget = uploadcare.Widget('[role=uploadcare-uploader]');
  
  function resize(w, h) {
      JFCustomWidget.requestFrameResize({
          width: w,
          height: h
      });
  }
  
  JFCustomWidget.subscribe('ready', function(){
      widget.onDialogOpen(function(dialog){
          resize(618, 500);
          
          dialog.always(function() {
              resize(300, 35);
          });
      });
      
      uploadcare.start({
        publicKey: 'demopublickey'
      });
  });
  
subject: fix resize