src/scripts/popup.js
/**
 * @param {string} searchTerm - Search term for Google Image search.
 * @param {function(string,number,number)} callback - Called when an image has
 *   been found. The callback gets the URL, width and height of the image.
 * @param {function(string)} errorCallback - Called when the image is not found.
 *   The callback gets a string that describes the failure reason.
 */
@param {string} searchTerm - Search term for Google Image search.
@param {function(string,number,number)} callback - Called when an image has
been found. The callback gets the URL, width and height of the image.
@param {function(string)} errorCallback - Called when the image is not found.
The callback gets a string that describes the failure reason.
@param { string } searchTerm - Search term for Google Image search . @param { function ( string number number ) } callback - Called when an image has been found . The callback gets the URL width and height of the image . @param { function ( string ) } errorCallback - Called when the image is not found . The callback gets a string that describes the failure reason .
function search(searchTerm, callback, errorCallback) {
    var rutracker = new Rutracker();
    rutracker.search(searchTerm, function(moviesCollection) {
        console.log(moviesCollection);
        callback(moviesCollection);
    });
}
function search ( searchTerm , callback , errorCallback ) { var rutracker = new Rutracker ( ) ; rutracker . search ( searchTerm , function ( moviesCollection ) { console . log ( moviesCollection ) ; callback ( moviesCollection ) ; } ) ; }
@param {string} searchTerm - Search term for Google Image search.
@param { string } searchTerm - Search term for Google Image search .