desertblade / iFrame

An iFrame module for Magic Mirror
25 stars 18 forks source link

Disble scrolling? #5

Open cyb0man opened 7 years ago

cyb0man commented 7 years ago

It would be nice if it was possible to disable scrolling on the webpage shown.

cyb0man commented 7 years ago

Scrolling in iFrame can now be set to; auto/yes/no

Update on code;

            // Default module config.
            defaults: {
                            height:"300px",
                            width:"100%",
                            scrolling:"auto"
            },

    // Override dom generator.
    getDom: function() {
            var iframe = document.createElement("IFRAME");
            iframe.style = "border:0"
            iframe.width = this.config.width;
            iframe.height = this.config.height;
            iframe.scrolling = this.config.scrolling;
            iframe.src =  this.config.url;
            return iframe;
    }