Skip to content

Commit

Permalink
Refactor: JS Code
Browse files Browse the repository at this point in the history
优化代码命名和逻辑,增加可读性,更新为现代 JavaScript 写法,窗口关闭按钮改为事件委托,修复用户模式下的 Bug(无法进行设置)
  • Loading branch information
Dreamer-Paul committed Mar 25, 2022
1 parent c5fe596 commit 5bafb1a
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 138 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<window>
<section class="the-window updated">
<div class="window-head">
<button>×</button>
<button data-type="close">×</button>
<h3>导航更新啦</h3>
</div>
<div class="window-body">
Expand All @@ -66,7 +66,7 @@ <h3>更新预告:</h3>
</section>
<section class="the-window about">
<div class="window-head">
<button>×</button>
<button data-type="close">×</button>
<h3>关于本项目</h3>
</div>
<div class="window-body">
Expand All @@ -93,7 +93,7 @@ <h3>使用了:</h3>
</section>
<section class="the-window setting">
<div class="window-head">
<button>×</button>
<button data-type="close">×</button>
<h3>设置</h3>
</div>
<div class="window-body">
Expand All @@ -104,7 +104,7 @@ <h3>设置</h3>
</label>
<label>
<span>自定义背景:</span>
<select name="background" data-key="back_method"></select>
<select name="background" data-key="background_type"></select>
</label>
<label>
<span>可选的预设导航项</span>
Expand Down
1 change: 0 additions & 1 deletion static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ window.active{
.the-window.active{
display: block;
animation: fade-small-large .3s forwards;

}
.the-window.closed{
animation: fade-large-small .3s forwards;
Expand Down
Loading

0 comments on commit 5bafb1a

Please sign in to comment.