You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider adding a check if scripts exist already on v3 branch, it was adding 4 copies of it on the page.
Changed this in util/embed-script.js:
exportfunctioninjector(document){if(document.documentElement.querySelector("#witchcraft-script"))return;constfnStr=functionfn(){/*INJECTION_POINT*/}.toString();constscript=document.createElement("script");script.id="witchcraft-script";script.text=`(${fnStr})()`;// when injecting at document_start, experimentation shows that <head> doesn't exist and <body> may not exist either// this is why here we are injecting the script tag directly into <html>, which seems guaranteed to existdocument.documentElement.appendChild(script);}
The text was updated successfully, but these errors were encountered:
Consider adding a check if scripts exist already on v3 branch, it was adding 4 copies of it on the page.
Changed this in
util/embed-script.js
:The text was updated successfully, but these errors were encountered: