From 5470b7f20cfd3d3f23c8f9bee513ef8aefcb110a Mon Sep 17 00:00:00 2001 From: SohamPatel46 Date: Thu, 22 Feb 2024 13:07:01 +0530 Subject: [PATCH] Build transcoder admin js file --- admin/js/rt-transcoder-admin.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/js/rt-transcoder-admin.min.js b/admin/js/rt-transcoder-admin.min.js index a436605..a8a23bf 100644 --- a/admin/js/rt-transcoder-admin.min.js +++ b/admin/js/rt-transcoder-admin.min.js @@ -3,4 +3,4 @@ * @package Transcoder */ -!function(a){a(document).ready(function(){a(document).on("click","#api-key-submit",function(b){if(!document.getElementById("new-api-key").value){a("#api-key-error").remove();var c=a("
",{id:"api-key-error",class:"error"});a("h1:first").after(c.html(a("

").text(rt_transcoder_script.error_empty_key))),b.preventDefault()}}),a(document).on("click","#disable-transcoding",function(b){if(b.preventDefault(),confirm(rt_transcoder_script.disable_encoding)){var c={action:"rt_disable_transcoding",rt_transcoder_security:rt_transcoder_script.security_nonce};0===a(this).next("img").length&&a(this).after(a("").attr("src",rt_transcoder_script.loader_image).addClass("rtt-loader")),a.post(ajaxurl,c,function(b){b&&(a("#rtt-settings_updated").length>0&&(a("#rtt-settings_updated p").text(b),a("#rtt-settings_updated").show()),a("#disable-transcoding").next("img").remove(),a("#disable-transcoding").hide(),a("#enable-transcoding").css("display","inline"))})}}),a(document).on("click","#enable-transcoding",function(b){if(b.preventDefault(),confirm(rt_transcoder_script.enable_encoding)){var c={action:"rt_enable_transcoding"};0===a(this).next("img").length&&a(this).after(a("").attr("src",rt_transcoder_script.loader_image).addClass("rtt-loader")),a.post(ajaxurl,c,function(b){b?(a("#rtt-settings_updated").length>0&&(a("#rtt-settings_updated p").text(b),a("#rtt-settings_updated").show()),a("#enable-transcoding").next("img").remove(),a("#enable-transcoding").hide(),a("#disable-transcoding").css("display","inline")):a("#settings-error-transcoding-disabled").remove()})}})})}(jQuery); \ No newline at end of file +!function(a){a(document).ready(function(){a(document).on("click","#api-key-submit",function(b){if(!document.getElementById("new-api-key").value){a("#api-key-error").remove();var c=a("

",{id:"api-key-error",class:"error"});a("h1:first").after(c.html(a("

").text(rt_transcoder_script.error_empty_key))),b.preventDefault()}}),a(document).on("click","#disable-transcoding",function(b){if(b.preventDefault(),confirm(rt_transcoder_script.disable_encoding)){var c={action:"rt_disable_transcoding",rt_transcoder_security:rt_transcoder_script.security_nonce_for_disabling_encoding};0===a(this).next("img").length&&a(this).after(a("").attr("src",rt_transcoder_script.loader_image).addClass("rtt-loader")),a.post(ajaxurl,c,function(b){b&&(a("#rtt-settings_updated").length>0&&(a("#rtt-settings_updated p").text(b),a("#rtt-settings_updated").show()),a("#disable-transcoding").next("img").remove(),a("#disable-transcoding").hide(),a("#enable-transcoding").css("display","inline"))})}}),a(document).on("click","#enable-transcoding",function(b){if(b.preventDefault(),confirm(rt_transcoder_script.enable_encoding)){var c={action:"rt_enable_transcoding",rt_transcoder_security:rt_transcoder_script.security_nonce_for_enabling_encoding};0===a(this).next("img").length&&a(this).after(a("").attr("src",rt_transcoder_script.loader_image).addClass("rtt-loader")),a.post(ajaxurl,c,function(b){b?(a("#rtt-settings_updated").length>0&&(a("#rtt-settings_updated p").text(b),a("#rtt-settings_updated").show()),a("#enable-transcoding").next("img").remove(),a("#enable-transcoding").hide(),a("#disable-transcoding").css("display","inline")):a("#settings-error-transcoding-disabled").remove()})}})})}(jQuery); \ No newline at end of file