Kaynağa Gözat

Hide postMeterBar & do it with CSS instead of JS

This hides the `postMeterBar` (closing #19) and, since it wasn't
possible with JS, includes the style with an injected stylesheet
(closing #8).
pull/26/head
Matt Baer 6 yıl önce
ebeveyn
işleme
3581f659f7
3 değiştirilmiş dosya ile 13 ekleme ve 0 silme
  1. +7
    -0
      content.js
  2. +3
    -0
      manifest.json
  3. +3
    -0
      medium.css

+ 7
- 0
content.js Dosyayı Görüntüle

@@ -13,6 +13,13 @@ var makeReadable = function() {
if (getUpdatesBar) {
getUpdatesBar.style.display = 'none';
}

// Load remaining styles
// This check makes sure the extension works on Chrome and Firefox.
if (typeof browser === 'undefined') {
browser = chrome;
}
document.head.insertAdjacentHTML('beforeend', '<link rel="stylesheet" type="text/css" href="' + browser.runtime.getURL("medium.css") + '">');
};

var hideHighlightMenu = function() {


+ 3
- 0
manifest.json Dosyayı Görüntüle

@@ -29,5 +29,8 @@
"matches": ["https://*/*"],
"js": ["content.js"]
}
],
"web_accessible_resources": [
"medium.css"
]
}

+ 3
- 0
medium.css Dosyayı Görüntüle

@@ -0,0 +1,3 @@
.postMeterBar {
display: none;
}

Yükleniyor…
İptal
Kaydet