• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-ModuleMonkeyPatch

Scheduled Pinned Locked Moved System
3 Posts 3 Posters 580 Views 3 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.
  • M Offline
    MMRIZE
    last edited by Aug 4, 2023, 8:55 AM

    MMM-ModuleMonkeyPatch

    MagicMirror module to make monkey-patching other modules
    https://github.com/MMRIZE/MMM-ModuleMonkeyPatch

    No screenshot, because it works in the background.

    Why?

    When you need some modification of existing modules but do not want to edit the original source code to prevent conflicts on upgrade/update.

    But… I think rare people will use this module. :D. This was my half-day weekend killing-time project.

    Usage example;

    • When you want to change the rendering of a specific module, but not sufficient with only CSS handling. So you have to modify getDom(), you can override that method with this module.
    • When you want to insert a logic into some module to handle your specific notification, you can override notificationReceived() with this module.

    Or many other things, without worrying of update/upgrading the original module on direct modification.

    Limitation

    • This module works after ALL_MODULES_STARTED notification, which means you cannot override start method.
    B M 2 Replies Last reply Aug 5, 2023, 7:41 AM Reply Quote 2
    • B Offline
      BKeyport Module Developer @MMRIZE
      last edited by Aug 5, 2023, 7:41 AM

      @MMRIZE Ok, so how do I defeat this for my module? 🤣

      The "E" in "Javascript" stands for "Easy"

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matuki Module Developer @MMRIZE
        last edited by Aug 6, 2023, 8:42 AM

        @MMRIZE Excellent!
        No more need to do ugly patch. Thank you for this module.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          3/3
          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