PHP Classes

File: assets/js/app/movie/fzmovies.js

Recommend this page to a friend!
  Classes of Ahmad Mustapha   Utility Web PHP API   assets/js/app/movie/fzmovies.js   Download  
File: assets/js/app/movie/fzmovies.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Utility Web PHP API
API to retrieve movie details and other resources
Author: By
Last change:
Date: 3 years ago
Size: 1,211 bytes
 

Contents

Class file image Download
$(function () { let $form = $('#form-fzmovies'); let $inputUrl = $form.find('input[name="fzmovies-url"]'); let $selectChosenLink = $form.find('select[name="chosen"]'); let $button = $form.find('button[type="submit"]'); let $linkExtractionStatus = $('#link-extraction-status'); $form.submit(function (event) { let link = performBasicLinkAction(event, $inputUrl, $button, $linkExtractionStatus); let chosenLink = $selectChosenLink.val(); if (link) { fetchLinkData('movies/fzmovies/' + chosenLink + '/' + link) .then(function (movie) { $button.removeAttr('disabled').html('<i class="fa fa-search"></i> Fetch'); $inputUrl.removeAttr('disabled'); $linkExtractionStatus.html(templateLinkExtractionSuccess({ href: movie.url, name: movie.name || 'Download' })); }) .catch(function (error) { $button.removeAttr('disabled').html('<i class="fa fa-search"></i> Fetch'); $inputUrl.removeAttr('disabled'); }); } }); });