webln.isEnabled() allows you to check if webln is enabled without explicitly enabling it through webln.enable() (which may cause a confirmation popup in some providers)
if(typeofwindow.webln !=='undefined'&&window.webln.isEnabled) {constisEnabled=awaitwindow.webln.isEnabled();// do something with the valueconsole.log(isEnabled) }