Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Darkmode is not defined #77

Copy link
Copy link
@heyepic

Description

@heyepic
Issue body actions

First off - thanks for making this and I hope I can get this working!

I'm implementing this on a Magento 2 store and I'm including it near the footer. However, I'm seeing the following error in console log:
(index):4595 Uncaught ReferenceError: Darkmode is not defined at addDarkmodeWidget ((index):4595)

I'm using the simple js include method here:

<html>
<body>
<!--StartFragment-->

<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
--
  | <script>
  | function addDarkmodeWidget() {
  | new Darkmode().showWidget();
  | }
  | window.addEventListener('load', addDarkmodeWidget);
  | </script>

<!--EndFragment-->
</body>
</html>

Any ideas?

ivanaugustobd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.