Git Product home page Git Product logo

mmm-widget2's Introduction

MMM-Widget2

MM module for displaying Web Widget or HTML code. This is lighter version of MMM-Widget. Made for usage by duplication.

Especially, this is not improved version of MMM-Widget. Just rebuilding for easy duplication. (Requested by @chassain)

Install

cd <YOUR_MAGIC_MIRROR_DIRECTORY>/modules
git clone https://github.com/eouia/MMM-Widget2

Configuration

{
  module: "MMM-Widget2",
  position: "top_left",
  config: {
  	refreshInterval: 1000*60*60,
  	file: "test.html",
  	iframeStyle: {
  		width: "800px",
  		height: "400px"
  	}
  }
},

Defaults & Details

config: {
  uid: null, // You can set `uid` for this module instance. Usually, no need to care about this unless use notification `WIDGET_REFRESH`.
  refreshInterval: 1000*60*60,
  code: "<p>Nothing to Show</p>", // Put here your widget script or html code.
  file: null, // if `file` is set, `code` will be ignored. Try to test "test.html"
  fullHTMLfile: false, // if your file is already full HTML document (with <html></html>) set this true.
  iframeStyle: {}, // define your iframe style. like above sample.
},

Refresh by notification

this.sendNotification("WIDGET_REFRESH")

This will refresh all duplicated MMM-Widget2 modules.

Or

this.sendNotification("WIDGET_REFRESH", "123")

This will refresh MMM-Widget2 sibling who has 123 as uid

Duplication

cd <YOUR_MAGIC_MIRROR_DIRECTORY>/modules
cp -vr ./MMM-Widget2 ./MMM-Widget2_2
cd MMM-Widget2_2
mv MMM-Widget2.js MMM-Widget2_2.js
nano MMM-Widget2_2.js

rename module name at line 1.

Module.register("MMM-Widget2_2",{ // When you duplicate this module, just edit here only.

mmm-widget2's People

Contributors

eouia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.