iFrame icon indicating copy to clipboard operation
iFrame copied to clipboard

Adding iFrame module causes everything to be blacked out.

Open Sachin1968 opened this issue 9 years ago • 6 comments

Used the code below and Magic Mirror just shows a black display. Any sugestions?

	{
	        module: 'iFrame',
	        position: 'middle_center', // This can be any of the regions.
	        config: {
	            // See 'Configuration options' for more information.
	                url: "http://google.com",
	                width: "650px",
	                height: "200px",
	            	}
		},

Sachin1968 avatar Nov 24 '16 20:11 Sachin1968

this will happen to any module if you aren't specifying the correct path. so for example i dumped my modules in a "thirdparty" subfolder. to reference it i have to reference it like this

	{
	        module: 'thirdparty/iFrame', //the module path with folder
	        position: 'middle_center', // This can be any of the regions.
	        config: {
	            // See 'Configuration options' for more information.
	                url: "http://google.com",
	                width: "650px",
	                height: "200px",
	            	}
		},

sp4ceman avatar Dec 28 '16 19:12 sp4ceman

oh also fyi you cannot put google.com in an iframe. or a lot of sites actually. so if you really want to you can prolly have a blind proxy or something that you request from and then shove that in an iframe

sp4ceman avatar Dec 28 '16 20:12 sp4ceman

@sp4ceman I used Google.com as a frame of reference, needless to say it didn't show, doh!

CriticalPoint avatar Jan 04 '17 13:01 CriticalPoint

in the future, use the server-only flag (i think) to test it using a browser when having problems. that gives you access to firebug and devtools to see the actual browser console log.

sp4ceman avatar Jan 04 '17 13:01 sp4ceman

It doesn't work for me :( I have cloned it and saved the folder under MagicMirror/Modules /(created a 'thirdparty' folder)/ however I get an error when loading (maybe is the url or that I am completely new to this.

this is my code which i pasted under "calendars" module:

{ module: "thirdparty/iFrame", header "Het weer" position: "top_right", // This can be any of the regions. config: { // See 'Configuration options' for more information. url: "https://gadgets.buienradar.nl/gadget/zoommap/?lat=52.13917&lng=5.04167&overname=2&zoom=13&naam=Maarssen&size=2&voor=0" width: "256px" // Optional. Default: 100% height: "256px" // Optional. Default: 100px } },

Do I miss anything? Do I need to modify the .js files as well? I would very much appreciate your assistance! Thanks a lot!

Canguingo avatar Nov 25 '18 13:11 Canguingo

Update:

My code looks like this, but it gives the error "Create Config file..." :

{ module: 'iFrame', header: 'Het weer' position: 'top_right', // This can be any of the regions. config: { url: "https://gadgets.buienradar.nl/gadget/radarfivedays", width: "100%", // Optional. Default: 100% height: "256px" // Optional. Default: 100px } },

Canguingo avatar Nov 25 '18 14:11 Canguingo