Skip to content

Commit

Permalink
Hide postMeterBar & do it with CSS instead of JS
Browse files Browse the repository at this point in the history
This hides the `postMeterBar` (closing #19) and, since it wasn't
possible with JS, includes the style with an injected stylesheet
(closing #8).
  • Loading branch information
thebaer committed Apr 10, 2018
1 parent 98542b8 commit e142bb4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content.js
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions manifest.json
Expand Up @@ -29,5 +29,8 @@
"matches": ["https://*/*"],
"js": ["content.js"]
}
],
"web_accessible_resources": [
"medium.css"
]
}
3 changes: 3 additions & 0 deletions medium.css
@@ -0,0 +1,3 @@
.postMeterBar {
display: none;
}

0 comments on commit e142bb4

Please sign in to comment.