CSS conflicts in certain sites + onload for favicons

This commit is contained in:
Alyssa X 2022-01-12 20:19:34 +01:00
parent f2e6341fe0
commit 4cb8c3459e
2 changed files with 5 additions and 1 deletions

View file

@ -162,6 +162,9 @@
margin-top: 5px;
margin-bottom: 5px;
box-sizing: border-box;
outline: none;
border: 0px;
box-shadow: none;
}
.omni-extension ::placeholder {
color: var(--placeholder);

View file

@ -25,7 +25,8 @@ $(document).ready(function(){
});
keys += "</div>";
}
var img = "<img src='"+action.favIconUrl+"' alt='favicon' onload='if ('naturalHeight' in this) {if (this.naturalHeight + this.naturalWidth === 0) {this.onerror();return;}} else if (this.width + this.height == 0) {this.onerror();return;}' onerror='this.src=&quot;"+chrome.runtime.getURL("/assets/globe.svg")+"&quot;' class='omni-icon'>";
var onload = 'if ("naturalHeight" in this) {if (this.naturalHeight + this.naturalWidth === 0) {this.onerror();return;}} else if (this.width + this.height == 0) {this.onerror();return;}';
var img = "<img src='"+action.favIconUrl+"' alt='favicon' onload='"+onload+"' onerror='this.src=&quot;"+chrome.runtime.getURL("/assets/globe.svg")+"&quot;' class='omni-icon'>";
if (action.emoji) {
img = "<span class='omni-emoji-action'>"+action.emojiChar+"</span>"
}