Skip to content

Commit d1a0659

Browse files
committed
up
1 parent aa521b9 commit d1a0659

File tree

13 files changed

+27
-33
lines changed

13 files changed

+27
-33
lines changed

10-regular-expressions/01-regexp-introduction/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ regexp = new RegExp("pattern", "flags");
2323
...And the short one, using slashes `"/"`:
2424

2525
```js
26-
regexp = /pattern/; // no flags флагов
26+
regexp = /pattern/; // no flags
2727
regexp = /pattern/gmi; // with flags g,m and i (to be covered soon)
2828
```
2929

@@ -90,7 +90,7 @@ Regular expressions may have flags that affect the search.
9090
There are only 5 of them in JavaScript:
9191
9292
`i`
93-
: With this flag the search is case-insensitive: no difference between `А` and `а` (see the example below).
93+
: With this flag the search is case-insensitive: no difference between `A` and `a` (see the example below).
9494
9595
`g`
9696
: With this flag the search looks for all matches, without it -- only the first one (we'll see uses in the next chapter).

10-regular-expressions/05-regexp-character-sets-and-ranges/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Several characters or character classes inside square brackets `[…]` mean to "
66

77
## Sets
88

9-
For instance, `pattern:[еао]` means any of the 3 characters: `'а'`, `'е'`, or `'о'`.
9+
For instance, `pattern:[eao]` means any of the 3 characters: `'a'`, `'e'`, or `'o'`.
1010

1111
That's calles a *set*. Sets can be used in a regexp along with regular characters:
1212

@@ -26,8 +26,8 @@ alert( "Voila".match(/V[oi]la/) ); // null, no matches
2626

2727
The pattern assumes:
2828

29-
- `pattern:В`,
30-
- then *одну* of the letters `pattern:[oi]`,
29+
- `pattern:V`,
30+
- then *one* of the letters `pattern:[oi]`,
3131
- then `pattern:la`.
3232

3333
So there would be a match for `match:Vola` or `match:Vila`.
@@ -70,7 +70,7 @@ They are denoted by a caret character `^` at the start and match any character *
7070

7171
For instance:
7272

73-
- `pattern:[^аеуо]` -- any character except `'a'`, `'e'`, `'y'` or `'o'`.
73+
- `pattern:[^aeyo]` -- any character except `'a'`, `'e'`, `'y'` or `'o'`.
7474
- `pattern:[^0-9]` -- any character except a digit, the same as `\D`.
7575
- `pattern:[^\s]` -- any non-space character, same as `\S`.
7676

10-regular-expressions/08-regexp-greedy-and-lazy/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Let's modify the pattern by making the quantifier `pattern:.*?` lazy:
237237
let str = '...<a href="link1" class="doc">... <a href="link2" class="doc">...';
238238
let reg = /<a href=".*?" class="doc">/g;
239239

240-
// Сработало!
240+
// Works!
241241
alert( str.match(reg) ); // <a href="link1" class="doc">, <a href="link2" class="doc">
242242
```
243243

10-regular-expressions/11-regexp-alternation/02-find-matching-bbtags/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A "bb-tag" looks like `[tag]...[/tag]`, where `tag` is one of: `b`, `url` or `qu
44

55
For instance:
66
```
7-
[b]текст[/b]
7+
[b]text[/b]
88
[url]http://google.com[/url]
99
```
1010

5-animation/1-bezier-curve/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Try to move points using a mouse in the example below:
4141

4242
[iframe src="demo.svg?nocpath=1&p=0,0,0.5,0,0.5,1,1,1" height=370]
4343

44-
**As you can notice, the curve stretches along the tangential lines 1 -> 2 и 3 -> 4.**
44+
**As you can notice, the curve stretches along the tangential lines 1 -> 2 and 3 -> 4.**
4545

4646
After some practice it becomes obvious how to place points to get the needed curve. And by connecting several curves we can get practically anything.
4747

5-animation/2-css-animations/boat.view/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<script>
1414
boat.onclick = function() {
1515

16-
this.onclick = null; // только первый клик сработает
16+
this.onclick = null; // only the first click should start the animation
1717

1818
let times = 1;
1919

@@ -40,4 +40,4 @@
4040

4141
</body>
4242

43-
</html>
43+
</html>

5-animation/2-css-animations/boat.view/style.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
cursor: pointer;
44
transition: margin-left 3s ease-in-out;
55
}
6-
/* переворот картинки через CSS */
76

7+
/* flipping the picture with CSS */
88
.back {
9-
-webkit-transform: scaleX(-1);
109
transform: scaleX(-1);
1110
filter: fliph;
12-
/* IE9- */
13-
}
11+
}

5-animation/3-js-animation/article.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ let timer = setInterval(function() {
2323
```
2424

2525
The more complete example of the animation:
26-
Более полный пример кода анимации:
2726

2827
```js
2928
let start = Date.now(); // remember start time

5-animation/3-js-animation/move.view/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
<script>
1919
train.onclick = function() {
20-
let start = Date.now(); // сохранить время начала
20+
let start = Date.now();
2121

2222
let timer = setInterval(function() {
23-
// вычислить сколько времени прошло из opts.duration
2423
let timePassed = Date.now() - start;
2524

2625
train.style.left = timePassed / 5 + 'px';
@@ -34,4 +33,4 @@
3433

3534
</body>
3635

37-
</html>
36+
</html>
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
function animate(options) {
1+
function animate({duration, draw, timing}) {
22

33
let start = performance.now();
44

55
requestAnimationFrame(function animate(time) {
6-
// timeFraction от 0 до 1
7-
let timeFraction = (time - start) / options.duration;
6+
let timeFraction = (time - start) / duration;
87
if (timeFraction > 1) timeFraction = 1;
98

10-
// текущее состояние анимации
11-
let progress = options.timing(timeFraction)
9+
let progress = timing(timeFraction)
1210

13-
options.draw(progress);
11+
draw(progress);
1412

1513
if (timeFraction < 1) {
1614
requestAnimationFrame(animate);
1715
}
1816

1917
});
20-
}
18+
}

5-animation/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Анимация
1+
# Animation
22

3-
CSS анимации. Контроль над ними из JavaScript. Анимации на чистом JavaScript.
3+
CSS and JavaScript animations.

7-frames-and-windows/06-clickjacking/top-location.view/iframe.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
<body>
99

10-
<div>Меняет top.location на javascript.ru</div>
10+
<div>Changes top.location to javascript.info</div>
1111

1212
<script>
13-
top.location = 'http://javascript.ru';
13+
top.location = 'https://javascript.info';
1414
</script>
1515

1616
</body>
1717

18-
</html>
18+
</html>

contributors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The file lists people who made significant contributions to the project:
66
<li>Alexey Shisterov (tutorial)</li>
77
<li>Anton Vernogor @smmurf (markup)</li>
88
<li>Artem Beztsenny @bezart (design)</li>
9-
<li>Илья Кантор @iliakan (tutorial, code)</li>
10-
<li>Юрий Ткаченко @tyv (markup)</li>
9+
<li>Ilya Kantor @iliakan (tutorial, code)</li>
10+
<li>Yuri Tkachenko @tyv (markup)</li>
1111
</ul>
1212

1313
The project exists for a long time, I might have missed someone. If you expect to find yourself in the list, but you're not -- please mail me at mk@javascript.ru.

0 commit comments

Comments
 (0)