1
0
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:
Kushagra Gour 2016-05-03 01:11:38 +05:30
parent 225c325ebd
commit cce694c6e7
2 changed files with 11 additions and 5 deletions

View File

@ -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 {

View File

@ -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) {