mirror of
https://github.com/chinchang/web-maker.git
synced 2025-02-20 13:16:43 +01:00
save layout settings.
This commit is contained in:
parent
225c325ebd
commit
cce694c6e7
@ -128,7 +128,7 @@
|
||||
.mode-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: rgba(255, 255, 255, 0.09)
|
||||
fill: rgba(255, 255, 255, 0.2)
|
||||
}
|
||||
.mode-btn:hover svg,
|
||||
.mode-btn.selected svg {
|
||||
|
14
script.js
14
script.js
@ -118,11 +118,17 @@
|
||||
});
|
||||
|
||||
function init () {
|
||||
layoutBtn1.addEventListener('click', function () { toggleLayout(1) });
|
||||
layoutBtn2.addEventListener('click', function () { toggleLayout(2) });
|
||||
layoutBtn3.addEventListener('click', function () { toggleLayout(3) });
|
||||
layoutBtn1.addEventListener('click', function () { saveSetting('layoutMode', 1); toggleLayout(1); });
|
||||
layoutBtn2.addEventListener('click', function () { saveSetting('layoutMode', 2); toggleLayout(2); });
|
||||
layoutBtn3.addEventListener('click', function () { saveSetting('layoutMode', 3); toggleLayout(3); });
|
||||
|
||||
toggleLayout(3);
|
||||
chrome.storage.local.get('layoutMode', function localGetCallback(result) {
|
||||
if (result.layoutMode) {
|
||||
toggleLayout(result.layoutMode);
|
||||
} else {
|
||||
toggleLayout(1);
|
||||
}
|
||||
});
|
||||
|
||||
function attachResizeListners () {
|
||||
function mouseMoveListener (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user