Skip to content

Commit

Permalink
修改扩展为chrome manifest v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ttglad committed May 6, 2022
1 parent 3bf9c05 commit 9803ac5
Show file tree
Hide file tree
Showing 23 changed files with 830 additions and 996 deletions.
Binary file modified release.crx
Binary file not shown.
417 changes: 417 additions & 0 deletions release/background.js

Large diffs are not rendered by default.

63 changes: 45 additions & 18 deletions release/css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ body {
visibility: hidden;
}

body, td, input, select, textarea, button {
body,
td,
input,
select,
textarea,
button {
color: #4e607d;
font: menu;
font-size: 9pt;
Expand Down Expand Up @@ -49,7 +54,8 @@ hr {
}

.button img {
vertical-align: text-bottom;;
vertical-align: text-bottom;
;
}

#optionsTable {
Expand Down Expand Up @@ -121,7 +127,8 @@ hr {
text-align: right;
}

#body .spacer, #body .spacer25 {
#body .spacer,
#body .spacer25 {
height: 25px;
}

Expand All @@ -137,7 +144,8 @@ hr {
height: 5px;
}

#proxyProfiles, .rulesTable {
#proxyProfiles,
.rulesTable {
width: 100%;
height: 100%;
border: solid 1px #d0d6d9;
Expand All @@ -146,11 +154,15 @@ hr {
table-layout: fixed;
}

#proxyProfiles th, #proxyProfiles td, .rulesTable th, .rulesTable td {
#proxyProfiles th,
#proxyProfiles td,
.rulesTable th,
.rulesTable td {
text-align: start;
}

#proxyProfiles th, .rulesTable th {
#proxyProfiles th,
.rulesTable th {
height: 28px;
padding: 0 8px;
font-size: 9pt;
Expand Down Expand Up @@ -220,7 +232,8 @@ hr {
text-align: center;
}

#proxyProfiles td input, .rulesTable td input {
#proxyProfiles td input,
.rulesTable td input {
width: 97% !important;
min-height: 24px;
height: 100%;
Expand Down Expand Up @@ -268,11 +281,13 @@ hr {
display: block;
}

#proxyProfiles td span, .rulesTable td span {
#proxyProfiles td span,
.rulesTable td span {
-webkit-padding-start: 6px;
}

#proxyProfiles td img, .rulesTable td img {
#proxyProfiles td img,
.rulesTable td img {
cursor: pointer;
}

Expand Down Expand Up @@ -336,25 +351,35 @@ span.indent {
padding-bottom: 8px;
}

#tabRulesBody td, #tabNetworkBody td, #tabGeneralBody td, #tabImportExportBody td {
#tabRulesBody td,
#tabNetworkBody td,
#tabGeneralBody td,
#tabImportExportBody td {
white-space: nowrap;
padding: 2px;
}

#tabRulesBody select, #tabNetworkBody select, #tabGeneralBody select, #tabImportExportBody select {
#tabRulesBody select,
#tabNetworkBody select,
#tabGeneralBody select,
#tabImportExportBody select {
width: 200px;
height: 140%;
}

#tabRulesBody td:nth-child(2), #tabNetworkBody td:nth-child(2), #tabGeneralBody td:nth-child(2), #tabImportExportBody td:nth-child(2) {
#tabRulesBody td:nth-child(2),
#tabNetworkBody td:nth-child(2),
#tabGeneralBody td:nth-child(2),
#tabImportExportBody td:nth-child(2) {
width: 100%;
}

#configListTable select {
height: 22px;
}

#configListTable input, #configListTable select {
#configListTable input,
#configListTable select {
width: 100%;
}

Expand All @@ -363,11 +388,11 @@ span.indent {
text-decoration: none;
}

#showUpgradePopup > img {
#showUpgradePopup>img {
width: 50px;
}

#showUpgradePopup > span {
#showUpgradePopup>span {
font-weight: bold;
color: #5ab432;
}
Expand Down Expand Up @@ -414,7 +439,8 @@ span.indent {
vertical-align: middle;
}

#upgradePopup input, #upgradePopup select {
#upgradePopup input,
#upgradePopup select {
width: 250px;
min-height: 24px;
height: 100%;
Expand Down Expand Up @@ -447,7 +473,8 @@ span.indent {
}

#upgradePopup .button img {
vertical-align: text-bottom;;
vertical-align: text-bottom;
;
}

#upgradePopup .header {
Expand All @@ -472,7 +499,7 @@ span.indent {
display: none;
}

#upgradePopup .note > * {
#upgradePopup .note>* {
height: auto !important;
padding-bottom: 6px;
}
Expand Down
28 changes: 20 additions & 8 deletions release/css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ body {
visibility: hidden;
}

body, td, th, input, select, textarea, button {
body,
td,
th,
input,
select,
textarea,
button {
font: menu;
font-size: 9pt;
}
Expand All @@ -24,7 +30,8 @@ hr {
border-top: solid 1px #eef;
}

.ltr, .ltr * {
.ltr,
.ltr * {
direction: ltr !important;
text-align: left !important;
}
Expand Down Expand Up @@ -112,7 +119,8 @@ hr {
border-top: 1px solid #ddd;
}

#menuError, #separatorError {
#menuError,
#separatorError {
display: none;
}

Expand Down Expand Up @@ -195,7 +203,8 @@ hr {
white-space: nowrap;
}

#about .close, #addRule .close {
#about .close,
#addRule .close {
position: absolute;
right: 10px;
cursor: pointer;
Expand All @@ -206,7 +215,8 @@ hr {
padding: 10px;
}

#about .close img, #addRule .close img {
#about .close img,
#addRule .close img {
cursor: pointer;
}

Expand Down Expand Up @@ -283,7 +293,8 @@ hr {
vertical-align: middle;
}

#addRule input, #addRule select {
#addRule input,
#addRule select {
width: 250px;
min-height: 24px;
height: 100%;
Expand Down Expand Up @@ -316,7 +327,8 @@ hr {
}

#addRule .button img {
vertical-align: text-bottom;;
vertical-align: text-bottom;
;
}

#addRule .header {
Expand All @@ -341,7 +353,7 @@ hr {
display: none;
}

#addRule .note > * {
#addRule .note>* {
height: auto !important;
padding-bottom: 6px;
}
Expand Down
117 changes: 60 additions & 57 deletions release/html/options.html
Original file line number Diff line number Diff line change
@@ -1,73 +1,76 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<title>XueXi Options</title>
<link rel="stylesheet" href="../css/options.css" type="text/css"/>
<link rel="stylesheet" href="../css/options.css" type="text/css" />
<script src="../libs/jquery.js" type="text/javascript"></script>
<script src="../js/options.js" type="text/javascript"></script>
</head>

<body>
<table id="optionsTable">
<tr>
<td>
<div id="header">
<table>
<tr>
<td style="width:100%">
<img src="../img/icon/icon_128x128.png" width="50" class="title" alt="xuexi"/>
<span class="title">XueXi Options</span>
<a id="showUpgradePopup" style="float: right;">
<span>选项升级</span>
<img src="../img/omega-64.png" title="选项升级"/>
</a>
</td>
<td>
</td>
</tr>
</table>
</div>
</td>
</tr>
<table id="optionsTable">
<tr>
<td>
<div id="header">
<table>
<tr>
<td style="width:100%">
<img src="../img/icon/icon_128x128.png" width="50" class="title" alt="xuexi" />
<span class="title">XueXi Options</span>
<a id="showUpgradePopup" style="float: right;">
<span>选项升级</span>
<img src="../img/omega-64.png" title="选项升级" />
</a>
</td>
<td>
</td>
</tr>
</table>
</div>
</td>
</tr>

<tr style="height:100%">
<td style="vertical-align:top">
<div id="body">
<tr style="height:100%">
<td style="vertical-align:top">
<div id="body">

<div id="tabRulesBody" class="tab" style="display:block;">
<div id="tabRulesBody" class="tab" style="display:block;">

<div id="switchRules">
<table id="configListTable" class="rulesTable">
<tr class="tableHeader">
<th style="width:10%">
<span>学习顺序</span>
</th>
<th style="width:25%">
<span>学习项目</span>
</th>
<th style="width:25%">
<span>是否学习</span>
</th>
<th style="width:20%">
<span>学习时长</span>
</th>
<th style="width:20%">
<span>答题顺序</span>
</th>
</tr>
</table>
<div id="switchRules">
<table id="configListTable" class="rulesTable">
<tr class="tableHeader">
<th style="width:10%">
<span>学习顺序</span>
</th>
<th style="width:25%">
<span>学习项目</span>
</th>
<th style="width:25%">
<span>是否学习</span>
</th>
<th style="width:20%">
<span>学习时长</span>
</th>
<th style="width:20%">
<span>答题顺序</span>
</th>
</tr>
</table>

<div style="text-align:right;">
<hr>
<button class="button" id="saveLearningConfig">
保存
</button>
<div style="text-align:right;">
<hr>
<button class="button" id="saveLearningConfig">
保存
</button>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

</html>
Loading

0 comments on commit 9803ac5

Please sign in to comment.