Bind settings window to Cinnamon Spiced pref button

This commit is contained in:
2023-12-23 14:02:31 +01:00
parent 132b33bdf8
commit 7c5e86e8dc
12 changed files with 3603 additions and 634 deletions

View File

@@ -53,32 +53,4 @@ function showNotification(title, text, showOpenSettings = false) {
// Display it
source.notify(notification);
}
/**
* Adding a message to the logs
*
* @param {string} logMsg New log message to add
*/
function createLogs(tvLogs, logMsg) {
/**
* Pad a number with leading zeros
*
* @param {number} num Number to format
* @param {number} size Final string length
*
* @returns String with defined length
*/
function pad(num, size) {
var s = "00" + num
return s.substring(s.length - size)
}
// Estimate date and time
let date = new Date()
let formattedDate = pad(date.getHours(), 2) + ":" + pad(date.getMinutes(), 2) + ":" + pad(date.getSeconds(), 2)
// Add the the logs
return formattedDate + "\t" + logMsg + "\n" + tvLogs
}