{"version":3,"file":"loggedIn.js","names":["loggedIn","loginCheck","el","username","innerHTML","classList","add","remove","initBlock","querySelector","targetNode","MutationObserver","mutationsList","observer","mutation","type","observe","childList","document","addEventListener","querySelectorAll","forEach"],"sources":["loggedIn.js"],"mappings":"AAAA,MAAMA,SAAW,MAEb,MAeMC,EAAa,CAACC,EAAIC,KACO,KAAvBA,EAASC,UACTF,EAAGG,UAAUC,IAAI,6BAEjBJ,EAAGG,UAAUE,OAAO,4BACxB,EAIJ,MAAO,CAACC,UAxBWN,IACf,MAAMC,EAAWD,EAAGO,cAAc,aAC5BC,EAAaP,EASF,IAAIQ,kBAPJ,SAAUC,EAAeC,GACtC,IAAK,IAAIC,KAAYF,EACI,aAAjBE,EAASC,MACTd,EAAWC,EAAIC,EAG3B,IAESa,QAAQN,EATF,CAACO,WAAW,GASS,EAa3C,EA3BgB,GA6BjBC,SAASC,iBAAiB,oBAAoB,WAC1CD,SAASE,iBAAiB,sBAAsBC,SAAQnB,GAAMF,SAASQ,UAAUN,IACrF","ignoreList":[],"sourcesContent":["const loggedIn = (() => {\r\n\r\n const initBlock = (el) => {\r\n const username = el.querySelector('#username'); \r\n const targetNode = username;\r\n const config = {childList: true};\r\n const callback = function (mutationsList, observer) {\r\n for (var mutation of mutationsList) {\r\n if (mutation.type == 'childList') {\r\n loginCheck(el, username)\r\n }\r\n }\r\n };\r\n const observer = new MutationObserver(callback);\r\n observer.observe(targetNode, config);\r\n };\r\n \r\n const loginCheck = (el, username) => {\r\n if (username.innerHTML === \"\") {\r\n el.classList.add('logged-in-message--hidden');\r\n } else {\r\n el.classList.remove('logged-in-message--hidden');\r\n }\r\n }\r\n\r\n\r\n return {initBlock};\r\n})();\r\n\r\ndocument.addEventListener('DOMContentLoaded', function () {\r\n document.querySelectorAll('.logged-in-message').forEach(el => loggedIn.initBlock(el));\r\n});"]}