MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Assistance with JavaScript widget

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 2 Posters 308 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jasond
      last edited by

      Hi,

      I’m a complete noob to coding but new to the MagicMirror.
      I have a few modules already loaded and working eg. MMM-cryptocurrency and MMM-Widget. The latter is displaying Tradingview widgets without any issues.

      My problem is:
      I want to add another widget but it doesn’t display on the mirror. All i see is a white space where the widget is supposed to be.
      The module MMM-Widget is installed and this is the entry on in the config file.
      {
      module: “MMM-Widget”,
      config: {
      widgets: [
      //This widget works
      {
      html:<!-- TradingView Widget BEGIN --> <div class="tradingview-widget-container"> <div class="tradingview-widget-container__widget"></div> <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com" rel="noopener" target="_blank"><span class="blue-text">Quotes</span></a> by TradingView</div> <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-tickers.js" async> { "symbols": [ { "description": "DOGECOIN", "proName": "BITTREX:DOGEUSD" }, { "description": "GOLD", "proName": "OANDA:XAUUSD" }, { "description": "AUD/USD", "proName": "OANDA:AUDUSD" }, { "description": "EUR/USD", "proName": "OANDA:EURUSD" }, { "description": "GBP/USD", "proName": "OANDA:GBPUSD" }, { "description": "AUD/CAD", "proName": "OANDA:AUDCAD" }, { "description": "EUR/CAD", "proName": "OANDA:EURCAD" }, { "description": "EUR/AUD", "proName": "OANDA:EURAUD" } ], "colorTheme": "dark", "isTransparent": true, "showSymbolLogo": true, "locale": "en" } </script> </div> <!-- TradingView Widget END -->, //insert your script or html codes here.
      position: “bottom_center”,
      width: “1800px”,
      height: “105px”,
      backgroundColor: “0000”
      },
      //This is the widget that doesn’t display
      {
      html:<script type="text/javascript"> DukascopyApplet = {"type":"fxmarkethours", "params":{ "showHeader":true, "displayMainMenu":false, "displayTimezoneChange":true, "displayInstrumentChange":true, "displayFollowButton":true, "allowTimezoneChange":true, "allowInstrumentChange":true, "defaultTimezone":1, "showIndicator":"0", "defaultFollowMode":true, "worldMapColor":"blue", "hoursBackground":"#444f5f", "hoursActiveBackground":"#7d92b0", "hoursTextColor":"#ffffff", "currentHourBGColor":"#f9fdff", "dstHourColor":"#0cf6ff", "indicatorBarColor":"#5090c6", "graphPointsColor":"#ffffff", "width":"743", "height":"433", "adv":"popup", "lang":"en" } }; </script>,
      position: “right”,
      width: “800px”,
      height: “450px”,
      backgroundColor: “#ffff”
      }
      ]
      }
      },

      Please help if you are able to.
      Thank you!
      Jason

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Jasond
        last edited by

        @jasond the second on is not a widget, it is code… < script…< /script>

        MM is expecting html content

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy