MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. mortenbirkelund
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 58
    • Groups 0

    Posts

    Recent Best Controversial
    • Swiper only works on first update...

      I am trying to add a swiper to the official rss news module, but I am having some problems. Whenever i open the page, the slider only works, the first time the getDom function is called. Once the rss feed is fetched and ready, the getDom function is called again, but this time the swiper doesnt work.

      I am using this swiper http://idangero.us/swiper/demos/
      and i am initating the swiper by creating a swiper object and passing it the class for the swiper div.

      	// Override dom generator.
      	getDom: function() {
      		if (this.newsItems.length > 0){
      			var swiper = new Swiper('.swiper-container');		
      			var container = document.createElement("div");
      			container.className = "swiper-container";
      				
      			var wrapper = document.createElement("div");
      			wrapper.className = "swiper-wrapper";
      
      ...... (more code ......
      
      return container;
      

      I cant figure out why the swiper only works the first time the getDom function is called. Any suggestions?

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      @strawberry-3.141 Thanks. I thought that MM would automatically look in the node_module folder. It is working now.

      posted in Development
      M
      mortenbirkelund
    • RE: Display JSON data from an api

      @cowboysdude said in Display JSON data from an api:

      it would be easier to just write a new module for it…

      Perhaps. I just guessed a the rest module could be a good starting point.

      posted in Requests
      M
      mortenbirkelund
    • RE: Display JSON data from an api

      You could take a look at the MMM-Rest… It doesnt have the ability to read json but could be modified. If you do modify it to accept json, please let me know as I am also looking for a way to do this.

      https://forum.magicmirror.builders/topic/1851/mmm-rest-reading-json

      posted in Requests
      M
      mortenbirkelund
    • RE: Activate Profiles (via MMM-ProfileSwitcher) using MMM-Remote-Control...

      http://MagicMirorIP:8080/remote?action=NOTIFICATION¬ification=CURRENT_PROFILE&payload={Profile:“Snille”}

      What about if you remove the double quotes from Profile? Just a guess.

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      @strawberry-3.141 Perfect. I now have the module in a node_module folder located inside the module folder.
      But how do i include this module into my code?

      	getScripts: function() {
      		return [
      			"moment.js","package.js"
      		];
      	},
      

      this is not wokring as i get an 404 error

      posted in Development
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      I am pretty sure that I did install it in my modules directory but I will try your suggestion. Thanks for a quick reply. Awesome forum 👍

      posted in Development
      M
      mortenbirkelund
    • Include from /modules/node_modules/

      I have a js script that I would like to include into my module. I have installed it into the modules/node_modules/ folder by running “npm install swiper”.

      How do i include this script into my module, so I can start using it?

      0_1488270765657_1.PNG

      posted in Development
      M
      mortenbirkelund
    • RE: Svendborg/Denmark - Magic Mirror finished!

      Could you tell a bit about the quality of the glass. I have been looking to purchase the same, but I wasn’t sure about the specs of the glass. Is it a suitable product for a magic mirror project?

      posted in Show your Mirror
      M
      mortenbirkelund
    • RE: New windows, NOT full size

      @roramirez said in New windows, NOT full size:

      Electron

      Could you please elaborate on ow i could use the Electron to open a browser window that is not full size, even though the magic Mirror browser is in full size?

      posted in Troubleshooting
      M
      mortenbirkelund
    • 1 / 1