This commit is contained in:
@@ -44,7 +44,13 @@ function PopulateContext(val){
|
||||
spanInfo.innerHTML = element.name;
|
||||
contextMenuElement.appendChild(spanInfo);
|
||||
|
||||
if(element.icon){
|
||||
if(element.color){
|
||||
let swatch = document.createElement('span');
|
||||
swatch.classList.add("context-menu-swatch");
|
||||
swatch.style.backgroundColor = element.color;
|
||||
contextMenuElement.appendChild(swatch);
|
||||
}
|
||||
else if(element.icon){
|
||||
let iconContextElement = document.createElement('img');
|
||||
iconContextElement.src = element.icon;
|
||||
contextMenuElement.appendChild(iconContextElement);
|
||||
|
||||
Reference in New Issue
Block a user