Browse Source

Remove the options tab

simov 8 years ago
parent
commit
5aee9a84b5
2 changed files with 2 additions and 19 deletions
  1. 2 17
      content/popup.js
  2. 0 2
      css/popup.css

+ 2 - 17
content/popup.js

@@ -21,9 +21,6 @@ var events = {
         message: 'compiler.name',
         compiler: state.compiler
       }, () => {
-        // preserve options order
-        state.compiler.options = []
-        m.redraw()
         chrome.runtime.sendMessage({message: 'settings'}, init)
       })
     },
@@ -85,14 +82,11 @@ var events = {
 
 var ui = {
   tabs: [
-    'theme', 'compiler', 'options', 'content'
+    'theme', 'compiler', 'content'
   ],
   compilers: [
     'showdown', 'marked'
   ],
-  flavors: [
-    'github', 'original'
-  ],
   description: {
     compiler: {
       marked: {
@@ -196,15 +190,6 @@ m.mount(document.querySelector('body'), {
         m('.mdl-tabs__panel #tab-compiler', {class: state.tab === 'compiler' ? 'is-active' : null},
           m('select.mdl-shadow--2dp', {onchange: events.compiler.name}, ui.compilers.map((name) =>
             m('option', {selected: state.compiler.name === name}, name)
-          ))
-        ),
-
-        // options
-        m('.mdl-tabs__panel #tab-options',
-          {class: state.tab === 'options' ? 'is-active' : null}, [
-          (state.compiler.name === 'showdown' || null) &&
-          m('select.mdl-shadow--2dp', {onchange: events.compiler.flavor}, ui.flavors.map((name) =>
-            m('option', {selected: state.compiler.flavor === name}, name)
           )),
           m('.scroll', {class: state.compiler.name},
             m('.mdl-grid', Object.keys(state.compiler.options || [])
@@ -224,7 +209,7 @@ m.mount(document.querySelector('body'), {
               ))
             )
           )
-        ]),
+        ),
 
         // content
         m('.mdl-tabs__panel #tab-content',

+ 0 - 2
css/popup.css

@@ -26,7 +26,6 @@ button:nth-child(2n+4) { float: right; margin-top: 20px; }
 
 /*tabs*/
 .mdl-tabs__tab-bar {
-  justify-content: flex-start;
   border: 0;
   height: 36px;
   margin: 20px 0 0 0;
@@ -36,7 +35,6 @@ button:nth-child(2n+4) { float: right; margin-top: 20px; }
   line-height: 36px;
   border-bottom: 1px solid #e0e0e0;
   height: 36px;
-  padding: 0 12px;
 }
 /*switch label*/
 .mdl-switch__label {