Your IP : 216.73.216.171


Current Path : /home/ereika83/www/wp-content/plugins/shortpixel-image-optimiser/res/js/screens/
Upload File :
Current File : /home/ereika83/www/wp-content/plugins/shortpixel-image-optimiser/res/js/screens/screen-nolist.js

'use strict';

// MainScreen as an option for delegate functions
class ShortPixelScreen extends ShortPixelScreenBase
{

  Init()
  {
    super.Init();
    this.ListenPLUpload();
  }


  // Only listening on the nolist ( and more specific -> media addnew) , since the post editor classic/ gutenberg and others have this interface otherwise hidden.
  ListenPLUpload() {

    // Most screen will not have uploader defined or ready.
    if (typeof uploader === 'undefined' || uploader === null)
    {
       return;
    }

    var self = this;
    uploader.bind('UploadComplete', function (up, file, response)
    {
        // Give processor a swoop when uploading is done, while respecting set boundaries.
        self.processor.RunProcess();
    });
  }

} // class