Use ES6 template strings
This commit is contained in:
parent
772654bcae
commit
c37134861e
@ -872,25 +872,28 @@ window._qutebrowser.caret = (function() {
|
||||
if (CaretBrowsing.isOldQt) {
|
||||
backgroundColor = "background-color: #000;";
|
||||
} else {
|
||||
backgroundColor =
|
||||
" --inherited-color: inherit;" +
|
||||
" background-color: var(--inherited-color, #000);" +
|
||||
" color: var(--inherited-color, #000);" +
|
||||
" mix-blend-mode: difference;" +
|
||||
" filter: invert(85%);";
|
||||
backgroundColor = `
|
||||
--inherited-color: inherit;
|
||||
background-color: var(--inherited-color, #000);
|
||||
color: var(--inherited-color, #000);
|
||||
mix-blend-mode: difference;
|
||||
filter: invert(85%);
|
||||
`;
|
||||
}
|
||||
|
||||
const style = ".CaretBrowsing_Caret {" +
|
||||
" position: absolute;" +
|
||||
" z-index: 2147483647;" +
|
||||
" min-height: 1em;" +
|
||||
" min-width: 0.2em;" +
|
||||
" animation: blink 1s step-end infinite;" +
|
||||
backgroundColor +
|
||||
"}" +
|
||||
"@keyframes blink {" +
|
||||
" 50% { visibility: hidden; }" +
|
||||
"}";
|
||||
const style = `
|
||||
.CaretBrowsing_Caret {
|
||||
position: absolute;
|
||||
z-index: 2147483647;
|
||||
min-height: 1em;
|
||||
min-width: 0.2em;
|
||||
animation: blink 1s step-end infinite;
|
||||
${backgroundColor}
|
||||
}
|
||||
@keyframes blink {
|
||||
50% { visibility: hidden; }
|
||||
}
|
||||
`;
|
||||
const node = document.createElement("style");
|
||||
node.innerHTML = style;
|
||||
document.body.appendChild(node);
|
||||
|
Loading…
Reference in New Issue
Block a user