Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var icons = {
- "fan-night":[0,0,24,24,"M 12.5 2 C 8.93 2 8.14 5.96 10.13 9.65 C 9.72 9.97 9.4 10.39 9.21 10.870000000000001 C 8.28 10.68 7.23 10.25 6.73 9.26 C 5.5600000000000005 6.89 2 7 2 11.5 C 2 15.07 5.95 15.85 9.64 13.870000000000001 C 9.96 14.27 10.39 14.59 10.88 14.79 C 10.68 15.71 10.24 16.75 9.26 17.24 C 6.9 18.42 7 22 11.5 22 C 12.31 22 13 21.78 13.5 21.41 C 13.19 20.67 13 19.86 13 19 C 13 17.59 13.5 16.3 14.3 15.28 C 14.17 14.97 14.03 14.65 13.86 14.34 C 14.26 14 14.57 13.59 14.77 13.11 C 15.26 13.21 15.78 13.39 16.25 13.67 C 17.07 13.25 18 13 19 13 C 20.05 13 21.03 13.27 21.89 13.74 C 21.95 13.37 22 12.96 22 12.5 C 22 8.92 18.03 8.13 14.33 10.13 C 14 9.73 13.59 9.42 13.11 9.22 C 13.3 8.29 13.74 7.24 14.73 6.75 C 17.09 5.57 17 2 12.5 2 M 12 11 C 12.54 11 13 11.45 13 12 C 13 12.55 12.54 13 12 13 C 11.43 13 11 12.55 11 12 C 11 11.45 11.43 11 12 11 M 22.303 17.292 L 23.415 16.37 L 21.979 16.336 L 21.44 14.986 L 20.962 16.361 L 19.527 16.455 L 20.663 17.336 L 20.322 18.745 L 21.518 17.916 L 22.731 18.694 L 22.303 17.292 Z M 21.193 20.668 C 20.056 20.48 19.023 19.805 18.398 18.72 C 17.775 17.643 17.715 16.395 18.099 15.302 C 18.219 15.011 17.963 14.72 17.672 14.764 C 14.733 15.327 13.4 18.857 15.297 21.266 C 16.843 23.18 19.809 23.249 21.424 21.309 C 21.62 21.087 21.491 20.711 21.193 20.668 Z"],
- //"":[0,0,24,24,""],
- }
- async function getIcon(name) {
- if (!(name in icons)) {
- console.log(`Icon "${name}" not available`);
- return '';
- }
- var svgDef = icons[name];
- var primaryPath = svgDef[4];
- return {
- path: primaryPath,
- viewBox: svgDef[0] + " " + svgDef[1] + " " + svgDef[2] + " " + svgDef[3]
- }}
- async function getIconList() {
- return Object.entries(icons).map(([icon]) => ({
- name: icon
- }));
- }
- window.customIconsets = window.customIconsets || {};
- window.customIconsets["cus"] = getIcon;
- window.customIcons = window.customIcons || {};
- window.customIcons["cus"] = { getIcon, getIconList };
Advertisement
Add Comment
Please, Sign In to add comment