UNPKG

webserverai

Version:

WebServerAI is an advanced project using AI to revolutionize web development. It empowers users to create visually stunning websites tailored to their needs without extensive coding knowledge. This innovative tool streamlines the design process, offering

29 lines 1.22 kB
// Import "Extensions" from extension.js to allow usages import Extensions from "../../assets/AI/js/components/extenstions.js"; import Events from "../../assets/AI/js/components/Events.js"; // START LOAD-UP (Required) const url = new URL(import.meta.url), ext = new Extensions(), events = new Events(), buildName = ext.getBuildName(url), buildID = ext.getBuildID(url), config = ext.configSearch(url,['options'],[{}]); ext.saveTemplate(buildName,ext.parse(buildName)); // END LOAD-UP if(ext.isAllowed(buildName)){ //USE "wsa-build" to trigger on build-submit window.addEventListener('wsa-build',(e)=>{ // Your code goes in here const lang = navigator.language, timezone = Intl.DateTimeFormat(lang).resolvedOptions().timeZone; config.options.timeZone = timezone; setInterval(()=>{ document.querySelectorAll('.clock').forEach((clock)=>{ clock.querySelector('.datetime').innerText = new Intl.DateTimeFormat(lang,config.options).format(new Date()); }); },1000); // Give elements based on your build name a unique ID ext.update(buildName); }); }else ext.noSupport(buildName);