Visitar URL original
[pull] master from soyaine:master by pull[bot] · Pull Request #1 · Zelda256/JavaScript30 · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f494a3e
Merge pull request #36 from dashrun/master
soyaine Oct 29, 2017
c2d79bd
Merge pull request #37 from dashrun/master
soyaine Nov 1, 2017
fd50d02
Merge pull request #39 from dashrun/master
soyaine Nov 12, 2017
76949a9
Change my name online
soyaine Dec 29, 2017
a5d97a5
替换第19~28项的Demo跳转链接
experdot Jan 5, 2018
3ec39d4
Merge pull request #43 from experdot/master
soyaine Jan 8, 2018
b8fce47
Update index-SOYAINE.html
fyzhu Mar 6, 2018
4a74e8e
Merge pull request #44 from fyzhu/patch-1
soyaine Mar 6, 2018
a9b940d
更新了readme文件中的示意图链接
dashnowords Jul 17, 2018
3c3b8e0
Merge branch 'master' into master
dashnowords Jul 17, 2018
da49c1d
fix typo `tranform-origin`
soyaine Jul 23, 2018
e0e6705
Create .gitattributes
dashnowords Sep 19, 2018
84f6d0b
Merge pull request #49 from dashnowords/master
soyaine Oct 30, 2018
f55e0ab
fix issue #57 #54 #53 #51 #41 #32
soyaine Dec 5, 2018
f91b4a2
fix issue #56 #55
soyaine Dec 6, 2018
d311720
fix #58 and lint code
soyaine Jun 25, 2019
202e91f
style: lint code
soyaine Jun 27, 2019
8e6eeda
remove videos link note #60
soyaine Jul 14, 2021
0a6c3e4
update nickname
soyaine Jul 14, 2021
f4232a6
fix #65 修复一些问题
soyaine Jul 11, 2022
59f2b7c
fix #58 variable name
soyaine Jun 25, 2019
f889ba1
style: lint comment code
soyaine Jun 25, 2019
bef7bbf
typo: change 'asset' to 'assert'
longlin10086 Oct 14, 2024
fc41f58
Merge pull request #67 from longlin10086/master
soyaine Oct 18, 2024
c3d9264
fix #68
soyaine Nov 10, 2025
a934c4a
fix #68
soyaine Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
  • Loading branch information
soyaine committed Dec 5, 2018
commit f55e0abbf0584b0db613e26dc4c4fb85c1d550b1
2 changes: 1 addition & 1 deletion 01 - JavaScript Drum Kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ audio.play();

### 如何使页面按钮恢复原状?

利用一个叫 [`transitionened`](https://developer.mozilla.org/zh-CN/docs/Web/Events/transitionend) 的事件,它在 CSS transition 结束后会被触发。我们就可以利用这个事件,在每次打鼓的效果(尺寸变大、颜色变化)完成之后,去除相应样式。
利用一个叫 [`transitionend`](https://developer.mozilla.org/zh-CN/docs/Web/Events/transitionend) 的事件,它在 CSS transition 结束后会被触发。我们就可以利用这个事件,在每次打鼓的效果(尺寸变大、颜色变化)完成之后,去除相应样式。

在这个页面中,发生 `transition` 的样式属性不止一个(`box-shadow`, `transform`, `border-color`),所以需要添加一个判断语句,使每发生一次按键事件时,只去除一次样式。

Expand Down
2 changes: 1 addition & 1 deletion 04 - Array Cardio Day 1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ console.table(thing)

1. 筛选 16 世纪出生的发明家
2. 展示他们的姓和名
3. 把他们按照年龄从大到小进行排序
3. 把他们按照出生日期从大到小进行排序
4. 计算所有的发明家加起来一共活了多少岁
5. 按照他们活了多久来进行排序
6. 筛选出一个网页里含有某个词语的标题
Expand Down
7 changes: 4 additions & 3 deletions 14 - JavaScript References VS Copying/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> 简介:[JavaScript30](https://javascript30.com) 是 [Wes Bos](https://github.com/wesbos) 推出的一个 30 天挑战。项目免费提供了 30 个视频教程、30 个挑战的起始文档和 30 个挑战解决方案源代码。目的是帮助人们用纯 JavaScript 来写东西,不借助框架和库,也不使用编译器和引用。现在你看到的是这系列指南的第 14 篇。完整指南在 [GitHub](https://github.com/soyaine/JavaScript30),喜欢请 Star 哦♪(^∇^*)

> 创建时间:2017-07-19
最后更新:2017-07-21
最后更新:2018-12-05

## 实现效果

Expand Down Expand Up @@ -98,6 +98,8 @@

使用 `Object.assign(target, ...sources)` 时,后来的源对象的属性值,将会覆盖它之前的对象的属性。所以可以先复制 `person` 之后,再赋给属性新的值。

需要注意的是:这个例子里面,我们用的数组和对象都只是一层嵌套,Lodash 有一个深度复制的方法,但使用之前需要多考虑一下。

```js
const cap2 = Object.assign({}, person, { number: 99, age: 12 });
console.log(cap2); // Object {name: "Wes Bos", age: 12, number: 99}
Expand All @@ -122,8 +124,7 @@
console.log(dev);
console.log(dev2);
```

最后需要注意的是:在前面的例子里面,我们用的数组和对象都只是一层嵌套,Lodash 有一个深度复制的方法,但你使用之前需要多考虑一下。


OVER~\(^o^)/~

Expand Down
7 changes: 5 additions & 2 deletions 15 - LocalStorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> 简介:[JavaScript30](https://javascript30.com) 是 [Wes Bos](https://github.com/wesbos) 推出的一个 30 天挑战。项目免费提供了 30 个视频教程、30 个挑战的起始文档和 30 个挑战解决方案源代码。目的是帮助人们用纯 JavaScript 来写东西,不借助框架和库,也不使用编译器和引用。现在你看到的是这系列指南的第 15 篇。完整指南在 [GitHub](https://github.com/soyaine/JavaScript30),喜欢请 Star 哦♪(^∇^*)

> 创建时间:2017-07-24
最后更新:2017-08-10
最后更新:2018-12-05

## 实现效果
我们的目的是使网页模拟菜单的效果,在页面中添加新的菜品,而且在页面刷新之后也不清空。
Expand Down Expand Up @@ -74,4 +74,7 @@
}
```
- **LocalStorage 更新**
我们利用 LocalStorage 把信息存到本地,从而可以保证刷新后内容不变。但使用 `localStorage` 的时候,直接把 `items` 传入得到的值是 [object Object],所以需要在把数据传进去之前就把内容转换成 String 类型的数据,之后读取时也使用 `JSON.parse()` 来将数据转换成 JSON 格式。
我们利用 LocalStorage 把信息存到本地,从而可以保证刷新后内容不变。但使用 `localStorage` 的时候,直接把 `items` 传入得到的值是 [object Object],所以需要在把数据传进去之前就把内容转换成 String 类型的数据,之后读取时也使用 `JSON.parse()` 来将数据转换成 JSON 格式。

> 来自 [@diabloevagto](https://github.com/diabloevagto) 在 [issue](https://github.com/soyaine/JavaScript30/issues/32) 里的补充:
> 这样的原因是因为 localStorage 里面只会储存 String 类型数据,如果传入的是非 String 则会直接使用 toString 转换:`({}).toString() //"[object Object]"`,这时候就会发生异常,所以才需要先使用 `JSON.stringify()` 将 Object 转换成 json 格式,读取出来之后再利用 `JSON.parse()` 转换为 Object。
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# JavaScript30 - 一个月纯 JS 挑战中文指南

创建日期:2016-12-20
最后更新:2017-10-29
最后更新:2018-12-05

> Repo by: [未枝丫](https://github.com/soyaine)
> [JavaScript30](https://javascript30.com) 教程作者:[Wes Bos](https://github.com/wesbos)
Expand Down Expand Up @@ -42,7 +42,7 @@ No | Guide | Demo
--- | --- | ---
1 | [JavaScript Drum Kit 指南](https://github.com/soyaine/JavaScript30/tree/master/01%20-%20JavaScript%20Drum%20Kit) | [纯 JS 模拟敲鼓效果](http://soyaine.github.io/JavaScript30/01%20-%20JavaScript%20Drum%20Kit/index-SOYAINE.html)
2 | [JS + CSS Clock 指南](https://github.com/soyaine/JavaScript30/tree/master/02%20-%20JS%20%2B%20CSS%20Clock) | [纯 JavaScript+CSS 时钟效果](http://soyaine.github.io/JavaScript30/02%20-%20JS%20%2B%20CSS%20Clock/index-SOYAINE.html)
3 | [CSS Variables 指南](https://github.com/soyaine/JavaScript30/tree/master/03%20-%20CSS%20%Variables) | [用 CSS 变量实现拖动控制参数效果](http://soyaine.github.io/JavaScript30/03%20-%20CSS%20Variables/index-SOYAINE.html)
3 | [CSS Variables 指南](https://github.com/soyaine/JavaScript30/tree/master/03%20-%20CSS%20Variables) | [用 CSS 变量实现拖动控制参数效果](http://soyaine.github.io/JavaScript30/03%20-%20CSS%20Variables/index-SOYAINE.html)
4 | [Array Cardio, Day 1 指南](https://github.com/soyaine/JavaScript30/tree/master/04%20-%20Array%20Cardio%20Day%201) | [数组基本操作方法示例一](http://soyaine.github.io/JavaScript30/04%20-%20Array%20Cardio%20Day%201/index-SOYAINE.html)
5 | [Flex Panel Gallery 指南](https://github.com/soyaine/JavaScript30/blob/master/05%20-%20Flex%20Panel%20Gallery/README.md) | [可伸缩的图片墙在线效果](https://soyaine.github.io/JavaScript30/05%20-%20Flex%20Panel%20Gallery/index-SOYAINE2.html)
6 | [Type Ahead 指南](https://github.com/soyaine/JavaScript30/blob/master/06%20-%20Type%20Ahead/README.md) | [根据关键词快速匹配诗句在线效果](https://soyaine.github.io/JavaScript30/06%20-%20Type%20Ahead/index-SOYAINE.html)
Expand All @@ -54,7 +54,7 @@ No | Guide | Demo
12 | [Key Sequence Detection 指南](https://github.com/soyaine/JavaScript30/tree/master/12%20-%20Key%20Sequence%20Detection/README.md) | [在线效果](https://soyaine.github.io/JavaScript30/12%20-%20Key%20Sequence%20Detection/index-FINISHED.html)
13 | [Slide in on Scroll 指南](https://github.com/soyaine/JavaScript30/blob/master/13%20-%20Slide%20in%20on%20Scroll/README.md) | [图片随屏幕滚动而滑入滑出的在线效果](https://soyaine.github.io/JavaScript30/13%20-%20Slide%20in%20on%20Scroll/index-SOYAINE.html)
14 | [JavaScript References vs. Copying 指南](https://github.com/soyaine/JavaScript30/tree/master/14%20-%20JavaScript%20References%20VS%20Copying) | -
15 | LocalStorage | -
15 | [LocalStorage](https://github.com/soyaine/JavaScript30/blob/master/15%20-%20LocalStorage/README.md) | [利用 localStorage 模拟在线菜单](https://soyaine.github.io/JavaScript30/15%20-%20LocalStorage/index-SOYAINE.html)
16 | [Mouse Move Shadow 指南](https://github.com/soyaine/JavaScript30/blob/master/16%20-%20Mouse%20Move%20Shadow/README.md) | [文字阴影随鼠标移动在线效果](https://soyaine.github.io/JavaScript30/16%20-%20Mouse%20Move%20Shadow/index-finished-es5.html)
17 | [Sort Without Articles 指南](https://github.com/soyaine/JavaScript30/blob/master/17%20-%20Sort%20Without%20Articles/README.md) | [去前缀排序在线效果](https://soyaine.github.io/JavaScript30/17%20-%20Sort%20Without%20Articles/index-finished-Dashrun-es5.html)
18 | [Adding Up Times with Reduce 指南](https://github.com/soyaine/JavaScript30/tree/master/18%20-%20AddingUpTimesWithReduce) | [使用 Reduce 进行时间叠加效果](https://soyaine.github.io/JavaScript30/18%20-%20AddingUpTimesWithReduce/index-finished-Dashrun-es6.html)
Expand Down