Issue #3238863 by hooroomoo: Refactor (if feasible) uses of the jQuery merge function to use vanillaJS