Read the statement by Michael Teeuw here.
Memory effect with MM2
-
@strawberry-3.141 yeah but i´m a css noob. maybe you can explain that a little? many thanks!
-
MMM-Anti-Screen-Burn-In.css
.MMM-Anti-Screen-Burn-In { margin: 55px 55px 65px 65px; /*this would shift it 5 pixels higher and 5 pixels to the right side than the standard of 60px on each side*/ }MMM-Anti-Screen-Burn-In.js
start: function(){ setInterval(() => { document.querySelector("body").classList.toggle("MMM-Anti-Screen-Burn-In"); }, 6 * 60 * 60 * 1000); // every 6 hours }, getStyles: function(){ return ["MMM-Anti-Screen-Burn-In.css"]; } -
@strawberry-3.141 WOW! Nice :) Thanks!
-
Great, i’ll try it!
-
@strawberry-3.141 Hi. This is exactly what I need. However, I dont know how to proceed with the information. Yes, I made the .css and .js file and put them in a new folder inside the module folder, but how do I then “activate” this? Could someone be so kind and explain step by step how to make this work?
Sorry for not knowing this I presume is quite basic, but so far I only installed ready made modules :)
Thanks
-
@strawberry-3.141 I tried to get your class into my MM but I don’t know where to put the .css and .js files and how to toggle them.
-
@wladek you add the css file to your module folder… and then modify your module.js code per the instructions above to load the css, and the timer code to invoke the other css…
you could also make a complete new module with a little more code…
make a folder
MM/modules/MMM-Anti-Screen-Burn-Input the css file in that folder
create a new file in that folderMMM-Anti-Screen-Burn-In.jsModule.register("MMM-Anti-Screen-Burn-In", { start: function(){ setInterval(() => { document.querySelector("body").classList.toggle("MMM-Anti-Screen-Burn-In"); }, 6 * 60 * 60 * 1000); // every 6 hours }, getStyles: function(){ return ["MMM-Anti-Screen-Burn-In.css"]; }, getDom: function(){ var wrapper = document.createElement("div"); return wrapper } })and the module to config.js
{ module: "MMM-Anti-Screen-Burn-In", position: middle } -
@sdetweil Tried that before, somehow works now though, thanks!
Only problem I have now is that the module displays two line of text right across the rest of my modules:MMM-Anti-Screen-Burn-In
module_8_MMM-Anti-Screen-Burn-InI didn’t add any text to the .js or .css file tho and I can’t figure out how to get rid of it.
-
@wladek oops… if no getDom(), MM puts out some content
replace the js file with this
Module.register("MMM-Anti-Screen-Burn-In", { start: function(){ setInterval(() => { document.querySelector("body").classList.toggle("MMM-Anti-Screen-Burn-In"); }, 6 * 60 * 60 * 1000); // every 6 hours }, getStyles: function(){ return ["MMM-Anti-Screen-Burn-In.css"]; }, getDom: function(){ var wrapper = document.createElement("div"); return wrapper } }) -
@sdetweil That has fixed it, thank you so much!
-
how do I then “activate” it?
Speed Test Scrabble Word Finder Solitaire -
@toucherts every 6 hours it toggles the class used to present the screen.
I just made a little module package on github
https://github.com/sdetweil/MMM-Anti-Screen-Burn-In -
@sdetweil said in Memory effect with MM2:
@toucherts every 6 hours it toggles the class used to present the screen.
I just made a little module package on github
https://github.com/sdetweil/MMM-Anti-Screen-Burn-InOK GOOD
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login