PageSourceSearch

https://studentveterans.org/wp-content/plugins/signature-field-for…/lib/js/signature.js?ver=1790262878

js studentveterans.org collected 2026-09-24 15:16:50 UTC 3,187 bytes, 95 lines download raw bytes

1(function ($) {
2	"use strict";
3	jQuery(document).ready(function ($) {
4		setTimeout(function () {
5			$(".elementor").not(".elementor-location-popup").each(function (e) {
6				$(".elementor-signature-field", $(this)).each(function (index) {
7					elementor_signature_field($(this));
8				});
9			})
10		}, 200);
11		$(document).on('click change',
12			'.e-form__buttons__wrapper button, .elementor-tab-title',
13			function () {
14				setTimeout(function () {
15					$(".elementor-signature-field:visible").each(function () {
16						elementor_signature_field($(this));
17					});
18				}, 50);
19			}
20		);
21		jQuery(document).on('elementor/popup/show', () => {
22			$(".elementor-signature-field:visible").each(function () {
23				elementor_signature_field($(this));
24			});
25		});
26		function elementor_signature_field(field) {
27			if (!field.is(':visible')) {
28				return;
29			}
30			var form = field.closest("form");
31			if (!form.length || !form.is(':visible')) {
32				return;
33			}
34			// Prevent double initialization
35			if (field.data('signature-initialized')) {
36				return;
37			}
38			field.data('signature-initialized', true);
39			$(".elementor-upload-field-signature").attr("type", "hidden");
40			var form = field.closest("form");
41			var data_id = field.data("id");
42			var background = field.data("background");
43			var color = field.data("color");
44			var data = $(".elementor-upload-field-signature-" + data_id, form).val();
45			var name = field.data("name");
46			if (name == 1) {
47				name = true;
48			} else {
49				name = false;
50			}
51			field.signature({
52				color: color,
53				background: background,
54				guideline: name,
55				syncFormat: "PNG",
56				syncField: $(".elementor-upload-field-signature-" + data_id, form),
57				name: name,
58				change: function () {
59				}
60			});
61			if (data != "") {
62				field.signature('draw', data);
63				$(".elementor-upload-field-signature-" + data_id, form).val(data);
64			} else {
65				$(".elementor-upload-field-signature-" + data_id, form).val("");
66			}
67		}
68		$("body").on("click", ".elementor-field-type-submit", function () {
69			var form = $(this).closest("form");
70			if ($(".elementor-upload-field-signature", form).length > 0) {
71				var required = $(".elementor-upload-field-signature", form).attr("required");
72				var check = $(".elementor-upload-field-signature", form).val();
73				if (required == "required" && check == "") {
74					$(".elementor-upload-field-signature", form).attr("type", "hidden");
75				}
76			}
77		})
78		$("body").on("click", ".elementor_signature_clear img", function () {
79			$(this).closest(".elementor-field-type-signature").find(".elementor-signature-field").signature('clear');
80			$(this).closest(".elementor-field-type-signature").find("input").val("").attr("value", "");
81		})
82		$("body").on("input", ".elementor_signature_name", function () {
83			var name = $(this).val();
84			$(this)
85				.closest(".elementor-field-type-signature")
86				.find(".elementor-signature-field")
87				.signature('setname', name);
88		});
89		$(document).on('reset', function (event) {
90			$(".elementor_signature_clear").each(function (index) {
91				$(this).find("img").click();
92			});
93		});
94	})
95})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.