Skip to content

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

License

Notifications You must be signed in to change notification settings

ulrichwisser/MMM-Widget2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published