<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Calling a general function]]></title><description><![CDATA[<p dir="auto">Hi guys, this is my first project using MM and I am having an issue to call a simple function.<br />
I need only modify the variable using a function and it is not working. Maybe because I put the function in the wrong place. Please, help me:</p>
<pre><code>/* global Log, Module, moment */

/* Magic Mirror
 * Module: Compliments
 *
 * By Michael Teeuw http://michaelteeuw.nl
 * MIT Licensed.
 */

var full_text = "Have a good stay";
function LoadData() {

	  full_text = "Welcome " + "Renato" + ". Have a great stay !";
}

$( document ).ready(function() {
	
		LoadData();

  }); 

Module.register("compliments", {
	// Module config defaults.
	defaults: {
		compliments: {
			anytime:[
				full_text,
			],
		},
		updateInterval: 72000000,
		remoteFile: null,
		fadeSpeed: 4000,
		morningStartTime: 3,
		morningEndTime: 12,
		afternoonStartTime: 12,
		afternoonEndTime: 17,
	},
</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/8515/calling-a-general-function</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 10:02:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/8515.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Aug 2018 07:20:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Calling a general function on Sun, 05 Aug 2018 17:39:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rsellmer" aria-label="Profile: rsellmer">@<bdi>rsellmer</bdi></a> I’m not sure, but you seem to use jQuery. but jQuery is not included by default. You should include jQuery into your module.</p>
]]></description><link>https://forum.magicmirror.builders/post/43068</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/43068</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 05 Aug 2018 17:39:25 GMT</pubDate></item><item><title><![CDATA[Reply to Calling a general function on Sun, 05 Aug 2018 14:15:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rsellmer" aria-label="Profile: rsellmer">@<bdi>rsellmer</bdi></a> said in <a href="/post/43032">Calling a general function</a>:</p>
<blockquote>
<p dir="auto">afternoonEndTime: 17,</p>
</blockquote>
<p dir="auto">try removing the comma at the end of this line.</p>
]]></description><link>https://forum.magicmirror.builders/post/43052</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/43052</guid><dc:creator><![CDATA[justjim1220]]></dc:creator><pubDate>Sun, 05 Aug 2018 14:15:43 GMT</pubDate></item></channel></rss>