VistaPanel-Customizations icon indicating copy to clipboard operation
VistaPanel-Customizations copied to clipboard

Update responsive-domain-search.js

Open SpookyKipper opened this issue 2 years ago • 3 comments

It seems that it currently targets the Addon, Sub, and parked domains page and makes the page only has the domain search form left.

This fixes it

SpookyKipper avatar Nov 09 '23 13:11 SpookyKipper

I don't think that there is a need for a check to implement the code only on the homepage. This code can be and I think should be implemented for all pages containing non-responsive fields.

aa22dev avatar Nov 10 '23 12:11 aa22dev

But the current code completely nukes the Addon, sub, and parked domains page (for me)

SpookyKipper avatar Nov 10 '23 12:11 SpookyKipper

Per README:

Put it in the Header Advert Area

Putting the code in the header advert area is meant to work as the solution for this issue, as the header advert area is supposed to be loaded only on the first screen. Are you facing this issue whilst having it there?

I am interested in your solution however, as it could theoretically help the script work correctly everywhere, and similar checks already exist in some other scripts (for example, Sidebar Bug Fix) where a simple check for an element with the id "main" was done (it only exists in the homepage as far as I'm aware) and if the element was null, the code would proceed. Your code appears to be more correct, so we could update those checks, and possibly merge yours.

With this in mind, do you think we should re-review the possibility to merge this @aa22dev?

Interesting sidenote ?option=home appears to be a legitimate option in vPanel, which displays just the top bar. Interesting.

I also just noticed this:

This code can be and I think should be implemented for all pages containing non-responsive fields.

The code currently does not do that, it makes only the domain field responsive by essentially recreating it. We could make a script that makes all non-responsive fields responsive I suppose, although in the past we've left that to theme creators to handle.

4yx avatar Nov 13 '23 02:11 4yx