clean up some todos, add favicon helper

This commit is contained in:
bignutty 2025-01-28 04:10:35 +01:00
parent 22e9b463a2
commit 7153c3ddaa
13 changed files with 32 additions and 31 deletions

View file

@ -40,6 +40,16 @@ module.exports.iconAsEmojiObject = function(icon){
}
/**
* Creates a favicon image via google s2
* @param {string} url Url
* @param {Number} size Favicon Size
* @returns {string} Favicon URL
*/
module.exports.favicon = function(url, size = 256){
return `https://www.google.com/s2/favicons?domain=${encodeURIComponent(url)}&sz=${size}`
}
module.exports.weatherIcon = function(icon){
if(!_iconExists("weather_" + icon)) return _icon("calendar");
return _icon("weather_" + icon)