1
0
mirror of https://github.com/thebaer/MMRA synced 2024-11-13 10:11:01 +00:00

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).
This commit is contained in:
Matt Baer 2018-04-10 11:58:44 -04:00
parent 8d4b501f3f
commit 3581f659f7
3 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,13 @@ var makeReadable = function() {
if (getUpdatesBar) { if (getUpdatesBar) {
getUpdatesBar.style.display = 'none'; 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() { var hideHighlightMenu = function() {

View File

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

3
medium.css Normal file
View File

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