Open matiasmacera opened 5 years ago
Im getting this error when trying to add the script
TypeError: null is not an object (evaluating 'document.body.insertBefore')
script in body is OK
Try loading the library with a function on window's load:
function addDarkmodeWidget() { new Darkmode().showWidget(); } window.addEventListener('load', addDarkmodeWidget);
Im getting this error when trying to add the script
TypeError: null is not an object (evaluating 'document.body.insertBefore')