PluginProbe
Document Embedder – let visitors read files without downloading / 1.8.6
Document Embedder – let visitors read files without downloading v1.8.6
2.3.1 2.3.0 2.2.1 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.3 1.7.4 1.7.6 1.7.9 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 2.0.0 2.0.1 2.0.2 All 30 releases
document-emberdder / admin / js / script.js

script.js in Document Embedder – let visitors read files without downloading 1.8.6, at admin/js/script.js

37 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($) {
2 $(document).ready(function () {
3
4 // import data
5 $(document).on("click", ".ppv_import_data", function (e) {
6 e.preventDefault();
7 $.ajax({
8 url: ppvAdmin.ajaxUrl,
9 data: {
10 action: "ppv_import_data",
11 },
12 success: function (data) {
13 const result = JSON.parse(data);
14 if (result.success === true) {
15 location.href = location.href + "?ppv-import=success";
16 }
17 },
18 });
19 });
20
21 // copy to clipboard
22 $(".ppv_front_shortcode input").on("click", function (e) {
23 e.preventDefault();
24
25 let shortcode = $(this).parent().find("input")[0];
26 shortcode.select();
27 shortcode.setSelectionRange(0, 30);
28 document.execCommand("copy");
29 $(this).parent().find(".htooltip").text("Copied Successfully!");
30 });
31
32 $(".ppv_front_shortcode input").on("mouseout", function () {
33 $(this).parent().find(".htooltip").text("Copy To Clipboard");
34 });
35 });
36 })(jQuery);
37