mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
clean up some todos, add favicon helper
This commit is contained in:
parent
22e9b463a2
commit
7153c3ddaa
13 changed files with 32 additions and 31 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue