Get rid of getStyleProperty()
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
26435287c1
commit
6f96e37434
1 changed files with 2 additions and 5 deletions
|
@ -1,4 +1,3 @@
|
||||||
const root = document.documentElement;
|
|
||||||
const dialogElement = document.getElementById('dialog');
|
const dialogElement = document.getElementById('dialog');
|
||||||
const detailsElement = document.getElementById('details');
|
const detailsElement = document.getElementById('details');
|
||||||
const dialogContentElement = document.getElementById('dialog-content');
|
const dialogContentElement = document.getElementById('dialog-content');
|
||||||
|
@ -11,8 +10,6 @@ window.onload = function() {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getStyleProperty = (s, p) => getComputedStyle(s).getPropertyValue(p);
|
|
||||||
|
|
||||||
function close_button(href) {
|
function close_button(href) {
|
||||||
clickSoundElement.play();
|
clickSoundElement.play();
|
||||||
window.location.href = href;
|
window.location.href = href;
|
||||||
|
@ -25,8 +22,8 @@ function details_button() {
|
||||||
dialogElement.animate([
|
dialogElement.animate([
|
||||||
{
|
{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
width: getStyleProperty(root, '--keyframe-hide-dialog-width'),
|
width: 'var(--keyframe-hide-dialog-width)',
|
||||||
paddingBottom: getStyleProperty(root, '--keyframe-hide-dialog-padding-bottom'),
|
paddingBottom: 'var(--keyframe-hide-dialog-padding-bottom)',
|
||||||
}
|
}
|
||||||
], {
|
], {
|
||||||
fill: 'forwards',
|
fill: 'forwards',
|
||||||
|
|
Loading…
Add table
Reference in a new issue