瀏覽代碼

Hide header detection option on firefox

simov 8 年之前
父節點
當前提交
cb94d9779f
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      content/options.js
  2. 2 1
      css/options.css

+ 2 - 1
content/options.js

@@ -83,7 +83,7 @@ var events = {
 
 chrome.extension.isAllowedFileSchemeAccess((isAllowedAccess) => {
   state.file = /Firefox/.test(navigator.userAgent)
-    ? true // Allow access to file URLs options isn't working on FF
+    ? true // Allow access to file URLs option isn't working on FF
     : isAllowedAccess
   m.redraw()
 })
@@ -166,6 +166,7 @@ m.mount(document.querySelector('main'), {
         ),
 
         // header detection
+        (!/Firefox/.test(navigator.userAgent) || null) &&
         m('label.mdc-switch m-switch', {
           onupdate: onupdate.switch,
           title: 'Toggle header detection'

+ 2 - 1
css/options.css

@@ -218,10 +218,11 @@ footer a:nth-of-type(2):before {
 .m-origins button:nth-of-type(2) { float: right; }
 .m-origins .m-select { width: 110px; }
 .m-origins .m-switch {
-  margin: 20px 0 20px 0;
+  margin: 20px 0 0 0;
 }
 .m-origins .m-list {
   clear: both;
+  margin: 20px 0 0 0;
 }
 .m-origins .m-list li > * { overflow: hidden; text-overflow: ellipsis; }
 .m-origins .m-list li > *:nth-child(1) { width: 7%; }