Skip to content
Snippets Groups Projects
Commit db938f85 authored by RANWEZ Pierre's avatar RANWEZ Pierre :anchor:
Browse files

:bug: bug: var editor unknown afeter refactor

parent 1fa3acd7
No related branches found
No related tags found
1 merge request!1✨ feat: CSSLSD V2
var audioButton = false; var audioButton = false;
var midiButton = false; var midiButton = false;
var activateButton; var activateButton;
var editor;
/** /**
* Load the editor and add css * Load the editor and add css
*/ */
function loadEditor() { function loadEditor() {
var editor = ace.edit("editor"); editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow_night"); editor.setTheme("ace/theme/tomorrow_night");
editor.session.setMode("ace/mode/css"); editor.session.setMode("ace/mode/css");
editor.setOptions({ editor.setOptions({
...@@ -97,6 +97,7 @@ function initUi() { ...@@ -97,6 +97,7 @@ function initUi() {
* Save CSS in editor via save button * Save CSS in editor via save button
*/ */
function updateCss() { function updateCss() {
console.log('updateCss');
chrome.tabs.query({ active: true, currentWindow: true }, chrome.tabs.query({ active: true, currentWindow: true },
function (tabs) { function (tabs) {
let cssStr = editor.getValue(); let cssStr = editor.getValue();
...@@ -162,7 +163,7 @@ $('#onOff').on('click', function () { ...@@ -162,7 +163,7 @@ $('#onOff').on('click', function () {
$('#audio').on('click', function () { $('#audio').on('click', function () {
audioButton = !audioButton; audioButton = !audioButton;
chrome.storage.sync.set({ audioB: audioButton }, function () { chrome.storage.sync.set({ audioI: audioButton }, function () {
}); });
chrome.tabs.query({ active: true, currentWindow: true }, chrome.tabs.query({ active: true, currentWindow: true },
function (tabs) { function (tabs) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment