Change local storage key

This commit is contained in:
Naoki Takezoe
2018-04-15 12:11:31 +09:00
parent 5022702796
commit 35655f33c7

View File

@@ -83,7 +83,7 @@ $(function(){
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
if(localStorage.getItem('gitbucket.editor.wrap') == 'true'){
if(localStorage.getItem('gitbucket:editor:wrap') == 'true'){
editor.getSession().setUseWrapMode(true);
$('#wrap').val('true');
}
@@ -110,10 +110,10 @@ $(function(){
$('#wrap').change(function(){
if($('#wrap option:selected').val() == 'true'){
editor.getSession().setUseWrapMode(true);
localStorage.setItem('gitbucket.editor.wrap', 'true');
localStorage.setItem('gitbucket:editor:wrap', 'true');
} else {
editor.getSession().setUseWrapMode(false);
localStorage.setItem('gitbucket.editor.wrap', 'false');
localStorage.setItem('gitbucket:editor:wrap', 'false');
}
});