Skip to content

Commit 3c1bb7d

Browse files
committed
Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info into sync-4541b7af
2 parents 9719563 + 4541b7a commit 3c1bb7d

File tree

22 files changed

+37
-49
lines changed

22 files changed

+37
-49
lines changed

1-js/02-first-steps/01-hello-world/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Script files are attached to HTML with the `src` attribute:
7373
<script src="/path/to/script.js"></script>
7474
```
7575

76-
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder.
76+
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder.
7777

7878
We can give a full URL as well. For instance:
7979

1-js/05-data-types/03-string/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Here's the full list:
8181
| Character | Description |
8282
|-----------|-------------|
8383
|`\n`|New line|
84-
|`\r`|Carriage return: not used alone. Windows text files use a combination of two characters `\r\n` to represent a line break. |
84+
|`\r`|In Windows text files a combination of two characters `\r\n` represents a new break, while on non-Windows OS it's just `\n`. That's for historical reasons, most Windows software also understands `\n`. |
8585
|`\'`, `\"`|Quotes|
8686
|`\\`|Backslash|
8787
|`\t`|Tab|

1-js/11-async/02-promise-basics/03-animate-circle-promise/solution.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
text-align: center;
1111
}
1212
.circle {
13-
transition-property: width, height, margin-left, margin-top;
13+
transition-property: width, height;
1414
transition-duration: 2s;
1515
position: fixed;
1616
transform: translateX(-50%) translateY(-50%);

2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.view/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
function clockStart() {
4646
// set a new interval only if the clock is stopped
4747
// otherwise we would rewrite the timerID reference to the running interval and wouldn't be able to stop the clock ever again
48-
if (!timerId) {
48+
if (!timerId) {
4949
timerId = setInterval(update, 1000);
5050
}
5151
update(); // <-- start right now, don't wait 1 second till the first setInterval works
@@ -56,7 +56,6 @@
5656
timerId = null; // <-- clear timerID to indicate that the clock has been stopped, so that it is possible to start it again in clockStart()
5757
}
5858

59-
clockStart();
6059
</script>
6160

6261
<!-- click on this button calls clockStart() -->

2-ui/2-events/01-introduction-browser-events/07-carousel/solution.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div id="carousel" class="carousel">
1111
<button class="arrow prev"></button>
1212
<div class="gallery">
13-
<ul class="images">
13+
<ul>
1414
<li><img src="https://en.js.cx/carousel/1.png"></li>
1515
<li><img src="https://en.js.cx/carousel/2.png"></li>
1616
<li><img src="https://en.js.cx/carousel/3.png"></li>

2-ui/2-events/04-default-browser-action/3-image-gallery/solution.view/gallery.css

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ body {
44
font: 75%/120% sans-serif;
55
}
66

7-
h2 {
8-
font: bold 190%/100% sans-serif;
9-
margin: 0 0 .2em;
10-
}
11-
12-
h2 em {
13-
font: normal 80%/100% sans-serif;
14-
color: #999999;
15-
}
16-
177
#largeImg {
188
border: solid 1px #ccc;
199
width: 550px;

2-ui/2-events/04-default-browser-action/3-image-gallery/source.view/gallery.css

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ body {
44
font: 75%/120% sans-serif;
55
}
66

7-
h2 {
8-
font: bold 190%/100% sans-serif;
9-
margin: 0 0 .2em;
10-
}
11-
12-
h2 em {
13-
font: normal 80%/100% sans-serif;
14-
color: #999999;
15-
}
16-
177
#largeImg {
188
border: solid 1px #ccc;
199
width: 550px;
@@ -32,4 +22,13 @@ h2 em {
3222

3323
#thumbs a:hover {
3424
border-color: #FF9900;
25+
}
26+
27+
#thumbs li {
28+
list-style: none;
29+
}
30+
31+
#thumbs {
32+
margin: 0;
33+
padding: 0;
3534
}

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/hoverIntent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class HoverIntent {
8888
if (speed < this.sensitivity) {
8989
clearInterval(this.checkSpeedInterval);
9090
this.isHover = true;
91-
this.over.call(this.elem, event);
91+
this.over.call(this.elem);
9292
} else {
9393
// speed fast, remember new coordinates as the previous ones
9494
this.prevX = this.lastX;

4-binary/01-arraybuffer-binary-arrays/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ new TypedArray();
126126

127127
We can create a `TypedArray` directly, without mentioning `ArrayBuffer`. But a view cannot exist without an underlying `ArrayBuffer`, so gets created automatically in all these cases except the first one (when provided).
128128

129-
To access the `ArrayBuffer`, there are properties:
130-
- `arr.buffer` -- references the `ArrayBuffer`.
131-
- `arr.byteLength` -- the length of the `ArrayBuffer`.
129+
To access the underlying `ArrayBuffer`, there are following properties in `TypedArray`:
130+
- `buffer` -- references the `ArrayBuffer`.
131+
- `byteLength` -- the length of the `ArrayBuffer`.
132132

133133
So, we can always move from one view to another:
134134
```js

7-animation/2-css-animations/3-animate-circle/solution.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<style>
77
.circle {
8-
transition-property: width, height, margin-left, margin-top;
8+
transition-property: width, height;
99
transition-duration: 2s;
1010
position: fixed;
1111
transform: translateX(-50%) translateY(-50%);

0 commit comments

Comments
 (0)