From 7918f5754facc03bd7a04f88bbb2050443c7be36 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Mon, 11 Dec 2023 19:38:34 -0500 Subject: [PATCH] refactor: Connect extra origins add current host button --- .../plugins/dynamix.my.servers/Connect.page | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page index 1447bcf23..f4e3f923d 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page @@ -464,22 +464,15 @@ $('body').on('change keyup', '.js-extraOrigins', function(data) { }); // Add the current URL to the Extra Origins setting on click then focus the input and automatically add the current window's origin -$('body').on('click', '.js-goToExtraOrigins', function(e) { +$('body').on('click', '.js-setCurrentHostExtraOrigins', function(e) { e.preventDefault(); - $extraOriginsInput = $('.js-extraOrigins'); - - $('html, body').animate({ - scrollTop: $extraOriginsInput.offset().top - }, 150); - // if the curent window origin is already in the input, run the validation and enable the apply button if ($extraOriginsInput.val().includes(window.location.origin)) { return extraOriginsValidateAndToggleDisabled(); } $extraOriginsInput.focus(); - if ($extraOriginsInput.val().length > 0) { // don't overwrite the value of the input, only add to it $extraOriginsInput.val($extraOriginsInput.val() + ', ' + window.location.origin); @@ -503,10 +496,14 @@ $('body').on('click', '.js-goToExtraOrigins', function(e) {
- _(Warning)_ host) ?>. -
_(For best results, add the current url to extra origins setting field below)_: _(Add the current URL to the Extra Origins setting)_ + + _(Warning)_ + host) ?>. +
+ _(For best results, add the current url to the **Unraid API extra origins** field below then apply the change)_. +
-

Allow Origins:

+

_(Known Origins)_:

    combinedKnownOrigins as $origin): ?>
  • @@ -718,7 +715,9 @@ _(Account status)_: :unraidnet_extraorigins_help:   -: +:
    +combinedKnownOrigins): ?> +