Browse Source

加入颜色的储存

tags/v30.0
枫谷剑仙 3 years ago
parent
commit
38e10561bf
2 changed files with 9 additions and 4 deletions
  1. +7
    -2
      script.js
  2. +2
    -2
      service-worker.js

+ 7
- 2
script.js View File

@@ -2278,10 +2278,15 @@ function initialize() {
setFontColor.onclick = function(){
setSelectionFontColor(colorChooser.value);
}
colorChooser.onchange = function(){
colorChooser.value = localStorage.getItem(cfgPrefix + colorChooser.id) || "#FF0000";
colorChooser.onchange = function(event){
setFontColor.style.color = this.value;
if (event) {
localStorage.setItem(cfgPrefix + this.id, this.value);
setFontColor.onclick(); //改变一次颜色
}
}
setFontColor.style.color = colorChooser.value;
colorChooser.onchange(false);
//添加头像图标
insertCardAvatar.onclick = function(){
//没有选择则返回


+ 2
- 2
service-worker.js View File

@@ -6883,7 +6883,7 @@ const cachesMap = new Map([
],
[
"script.js",
"0a08fc1e6108a61d50f5fe055b604937"
"874aeb913204f3c9224d3bd4198e7547"
],
[
"solo.html",
@@ -6895,7 +6895,7 @@ const cachesMap = new Map([
],
[
"style.css",
"4646f5517719e4345223a9f66ad19b42"
"9b2683503d12326ff052f8c8689440ef"
],
[
"temp.js",


Loading…
Cancel
Save