PageSourceSearch

https://www.hotelmanagement-network.com/wp-content/themes/goodlife…/assets/js/modules/gdm-clone-element.js

js hotelmanagement-network.com collected 2026-09-24 18:36:16 UTC 809 bytes, 24 lines download raw bytes

1export default function CloneElement(
2    selectors,
3    parentTagName,
4    cloneTo,
5    position,
6    keepOriginal,
7    addClass,
8    variable
9) {
10
11    window.addEventListener("load", function () {
12
13        const elementsToClone = variable ? variable : document.querySelectorAll(selectors);
14        [...elementsToClone].forEach(el => {
15            if (el.parentElement.tagName === parentTagName) {
16                const elementHTML = el.cloneNode(true);
17                elementHTML.style.clear = "both";
18                elementHTML.classList.add(addClass);
19                cloneTo ? document.querySelector(cloneTo).insertAdjacentElement(position, elementHTML) : el.parentElement.insertAdjacentElement(position, elementHTML);
20                if (!keepOriginal) el.remove();
21            }
22        })
23    });
24};

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.