Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 361aba1

Browse files
authoredJun 4, 2025
Merge pull request #215 from otmon76/1.14.7
1.14.7
2 parents cd11b15 + 2c14b6b commit 361aba1

File tree

9 files changed

+1920
-533
lines changed

9 files changed

+1920
-533
lines changed
 

‎1-js/99-js-misc/07-weakref-finalizationregistry/article.md

Lines changed: 209 additions & 240 deletions
Large diffs are not rendered by default.

‎1-js/99-js-misc/07-weakref-finalizationregistry/weakref-dom.view/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<body>
1111

1212
<div class="app">
13-
<button class="start-messages">Start sending messages</button>
13+
<button class="start-messages">Začít posílat zprávy</button>
1414
<div class="window">
1515
<div class="window__header">
16-
<p class="window__title">Messages:</p>
17-
<button class="window__button">Close</button>
16+
<p class="window__title">Zprávy:</p>
17+
<button class="window__button">Zavřít</button>
1818
</div>
1919
<div class="window__body">
20-
No messages.
20+
Žádné zprávy.
2121
</div>
2222
</div>
2323
</div>
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
const startMessagesBtn = document.querySelector('.start-messages'); // (1)
2-
const closeWindowBtn = document.querySelector('.window__button'); // (2)
3-
const windowElementRef = new WeakRef(document.querySelector(".window__body")); // (3)
1+
const tlačítkoZačítPosílat = document.querySelector('.start-messages'); // (1)
2+
const tlačítkoZavřítOkno = document.querySelector('.window__button'); // (2)
3+
const odkazNaElementOkna = new WeakRef(document.querySelector(".window__body")); // (3)
44

5-
startMessagesBtn.addEventListener('click', () => { // (4)
6-
startMessages(windowElementRef);
7-
startMessagesBtn.disabled = true;
5+
tlačítkoZačítPosílat.addEventListener('click', () => { // (4)
6+
startMessages(odkazNaElementOkna);
7+
tlačítkoZačítPosílat.disabled = true;
88
});
99

10-
closeWindowBtn.addEventListener('click', () => document.querySelector(".window__body").remove()); // (5)
10+
tlačítkoZavřítOkno.addEventListener('click', () => document.querySelector(".window__body").remove()); // (5)
1111

1212

13-
const startMessages = (element) => {
14-
const timerId = setInterval(() => { // (6)
13+
const začniPosílatZprávy = (element) => {
14+
const idČasovače = setInterval(() => { // (6)
1515
if (element.deref()) { // (7)
16-
const payload = document.createElement("p");
17-
payload.textContent = `Message: System status OK: ${new Date().toLocaleTimeString()}`;
18-
element.deref().append(payload);
16+
const zátěž = document.createElement("p");
17+
zátěž.textContent = `Zpráva: Stav systému OK: ${new Date().toLocaleTimeString()}`;
18+
element.deref().append(zátěž);
1919
} else { // (8)
20-
alert("The element has been deleted."); // (9)
21-
clearInterval(timerId);
20+
alert("Element byl odstraněn."); // (9)
21+
clearInterval(idČasovače);
2222
}
2323
}, 1000);
2424
};
Lines changed: 177 additions & 26 deletions
Loading
Lines changed: 159 additions & 26 deletions
Loading

‎1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry-03.svg

Lines changed: 394 additions & 64 deletions
Loading

‎1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry-04.svg

Lines changed: 423 additions & 66 deletions
Loading

‎1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry-05.svg

Lines changed: 535 additions & 88 deletions
Loading

‎1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry.view/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<head>
55
<meta charset="utf-8">
66
<link rel="stylesheet" href="index.css">
7-
<title>Photo Library Collage</title>
7+
<title>Koláž fotoknihovny</title>
88
</head>
99

1010
<body>
1111

1212
<div class="app">
1313
<header class="header">
1414
<h1 class="header-text">
15-
Photo Library Collage
15+
Koláž fotoknihovny
1616
</h1>
1717
</header>
1818
<div class="container">
@@ -24,9 +24,9 @@ <h1 class="header-text">
2424
<div>
2525
<div class=actions>
2626
<select class="select"></select>
27-
<button class="btn btn--primary btn-create-collage"> Create collage </button>
28-
<button class="btn btn--secondary btn-start-over"> Start over </button>
29-
<button class="btn btn--success btn-download" onClick={downloadCollage}> Download </button>
27+
<button class="btn btn--primary btn-create-collage"> Vytvořit koláž </button>
28+
<button class="btn btn--secondary btn-start-over"> Spustit </button>
29+
<button class="btn btn--success btn-download" onClick={downloadCollage}> Stáhnout </button>
3030
</div>
3131
<div class="previewContainer">
3232
<div class="spinnerContainer spinnerContainer--hidden">

0 commit comments

Comments
 (0)
Please sign in to comment.