mirror of
https://github.com/alyssaxuu/omni.git
synced 2026-03-11 08:54:35 +00:00
CSS conflicts in certain sites + onload for favicons
This commit is contained in:
parent
f2e6341fe0
commit
4cb8c3459e
2 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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=""+chrome.runtime.getURL("/assets/globe.svg")+""' 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=""+chrome.runtime.getURL("/assets/globe.svg")+""' class='omni-icon'>";
|
||||
if (action.emoji) {
|
||||
img = "<span class='omni-emoji-action'>"+action.emojiChar+"</span>"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue