var HelpRevamp = { init : function(){ // Using class selectors const container = document.querySelector('#searchElewrap'); const menu = document.querySelector('.x-toolbar-cell'); // Check if both elements exist if (container && menu) { container.appendChild(menu); } else { console.log("One or both elements not found"); } }, printPage : function(){ document.querySelectorAll(".option-stn .menu-dot")[0].click(); document.querySelectorAll("#print-menu ul a")[0].click() // Print Page }, pageLink : function(){ document.querySelectorAll(".option-stn .menu-dot")[0].click(); document.querySelectorAll("#print-menu ul a")[1].click() // Page Links }, savePageAsPDF : function(){ document.querySelectorAll(".option-stn .menu-dot")[0].click(); document.querySelectorAll("#print-menu ul a")[2].click() // Save Page as PDF Links }, saveSiteAsPDF : function(){ document.querySelectorAll(".option-stn .menu-dot")[0].click(); document.querySelectorAll("#print-menu ul a")[3].click() // Save Site as PDF Links } } HelpRevamp.init()