HEX
Server: LiteSpeed
System: Linux s1.hostssdserver.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: dreamlan (1220)
PHP: 8.3.32
Disabled: exec,system,passthru,shell_exec,proc_open,popen,apache_child_terminate
Upload Files
File: /home/dreamlan/public_html/wp-content/plugins/html5-video-player/admin/js/script.js
(function ($) {
  $(document).ready(function () {
    $(".h5vp_player_type .csf-fieldset .csf--button-group .csf--button").on("click", function () {
      setTimeout(() => {
        $(".h5vp_player_type_controls").addClass("h5vp_player_controls_click_trigger newclassbro");
        $(".h5vp_player_controls_click_trigger").removeClass("h5vp_player_type_controls");
        const playerType = $(this).parent(".csf--button-group").find(".csf--active input").val();
        $('.h5vp_player_controls_click_trigger .csf-fieldset .csf--button-group .csf--button input[value="' + playerType + '"]')
          .parent()
          .trigger("click");

        $(".h5vp_player_controls_click_trigger").removeClass("h5vp_player_controls_click_trigger");
      }, 100);
      setTimeout(() => {
        $(".newclassbro").addClass("h5vp_player_type_controls");
      }, 1000);
    });

    $(".h5vp_player_type_controls .csf-fieldset .csf--button-group .csf--button").on("click", function () {
      setTimeout(() => {
        $(".h5vp_player_type").addClass("h5vp_player_click_trigger");
        $(".h5vp_player_controls_click_trigger").removeClass("h5vp_player_type");
        const playerType = $(this).parent(".csf--button-group").find(".csf--active input").val();
        $('.h5vp_player_click_trigger .csf-fieldset .csf--button-group .csf--button input[value="' + playerType + '"]')
          .parent()
          .trigger("click");
        $(".h5vp_player_click_trigger").removeClass("h5vp_player_click_trigger");
      }, 100);
      setTimeout(() => {
        $(".h5vp_player_click_trigger").addClass("h5vp_player_type");
      }, 1000);
    });

    $(".h5vp_duplicate_player").on("click", function (event) {
      event.preventDefault();
      $.post(
        ajax.ajax_url,
        {
          action: "h5vp_dulicate_player",
          postid: $(this).data("postid"),
          security: $(this).attr("security"),
        },
        function (data) {
          if (data) {
            let location = window.location.href;
            if (location.split("?").length > 1) {
              location = location + "&duplicate=success";
            } else {
              location = location + "?duplicate=success";
            }
            window.location.href = location;
          }
        }
      );
    });

    let url = window.location.href;
    let newUrl = url.search("duplicate=success");
    if (newUrl != "-1") {
      window.history.pushState({ urlPath: "edit.php?post_type=videoplayer" }, "", "edit.php?post_type=videoplayer");
    }

    $(".h5vp_front_shortcode input").on("click", function (e) {
      e.preventDefault();

      let shortcode = $(this).parent().find("input")[0];
      shortcode.select();
      shortcode.setSelectionRange(0, 30);
      document.execCommand("copy");
      $(this).parent().find(".htooltip").text("Copied Successfully!");
    });

    $(".h5vp_front_shortcode input").on("mouseout", function () {
      $(this).parent().find(".htooltip").text("Copy To Clipboard");
    });

    $(".h5vp_show_password").on("click", function () {
      let type = $(this).parent().find("input").attr("type");
      if (type == "password") {
        $(this).parent().find("input").attr("type", "text");
      } else {
        $(this).parent().find("input").attr("type", "password");
      }
    });
  });
})(jQuery);