PluginProbe
HTTP Headers / 1.1.2
HTTP Headers v1.1.2
1.19.5 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.13.1 1.13.2 1.13.3 1.13.4 1.14.0 1.14.1 1.14.2 1.15.0 All 60 releases
http-headers / assets / scripts.js

scripts.js in HTTP Headers 1.1.2, at assets/scripts.js

36 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($, undefined) {
2 $(function() {
3 "use strict";
4
5 $(document).on('change', 'select[name="hh_x_frame_options_value"]', function () {
6 var $el = $('input[name="hh_x_frame_options_domain"]'),
7 disabled = $(this).find('option:selected').val() != 'allow-from' || this.disabled;
8 if ($el.length) {
9 $el.prop('disabled', disabled).toggle(!disabled);
10 }
11 }).on('change', 'select[name="hh_access_control_allow_origin_value"]', function () {
12 var $el = $('input[name="hh_access_control_allow_origin_url"]'),
13 disabled = $(this).find('option:selected').val() != 'origin' || this.disabled;
14 if ($el.length) {
15 $el.prop('disabled', disabled).toggle(!disabled);
16 }
17 }).on('change', '.http-header', function () {
18 var $this = $(this),
19 $el = $this.closest('tr').find('.http-header-value');
20
21 if (!$el.length) {
22 return;
23 }
24
25 if (Number($this.val()) === 1) {
26 $el.prop('disabled', false);
27 } else {
28 $el.prop('disabled', true);
29 }
30 }).on('change', 'input[name="hh_x_frame_options"]', function () {
31 $('select[name="hh_x_frame_options_value"]').trigger('change');
32 }).on('change', 'input[name="hh_access_control_allow_origin"]', function () {
33 $('select[name="hh_access_control_allow_origin_value"]').trigger('change');
34 });
35 });
36 })(jQuery);