mirror of
https://github.com/thebaer/MMRA
synced 2024-11-13 10:11:01 +00:00
Merge pull request #25 from Nudin/master
Hide highlightbar on selection
This commit is contained in:
commit
4db614aa4b
10
content.js
10
content.js
@ -15,6 +15,13 @@ var makeReadable = function() {
|
||||
}
|
||||
};
|
||||
|
||||
var hideHighlightMenu = function() {
|
||||
var bar = document.querySelector('.highlightMenu');
|
||||
if (bar) {
|
||||
bar.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
var hideDickbar = function() {
|
||||
var dickbar = document.querySelector('.js-postShareWidget');
|
||||
if (dickbar) {
|
||||
@ -76,6 +83,9 @@ if (document.querySelector('head meta[property="al:ios:app_name"][content="mediu
|
||||
if (items.disableLazyImages) {
|
||||
disableLazyLoading();
|
||||
}
|
||||
if (items.hideHighlightMenu) {
|
||||
hideHighlightMenu();
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(document.body, config);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
"name": "Make Medium Readable Again",
|
||||
"description": "Neutralizes annoying parts of the Medium reading experience and lets you read again.",
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.0",
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
@ -11,6 +11,9 @@
|
||||
#status {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
#save {
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -25,6 +28,10 @@
|
||||
<input type="checkbox" id="images"> Disable lazy image loading
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" id="highlight"> Disable Highlight Menu
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2>Default Features</h2>
|
||||
|
@ -2,9 +2,11 @@
|
||||
function save_options() {
|
||||
var hideDickbar = document.getElementById('dickbar').checked;
|
||||
var disableLazyImages = document.getElementById('images').checked;
|
||||
var hideHighlightMenu = document.getElementById('highlight').checked;
|
||||
chrome.storage.sync.set({
|
||||
hideDickbar: hideDickbar,
|
||||
disableLazyImages: disableLazyImages
|
||||
disableLazyImages: disableLazyImages,
|
||||
hideHighlightMenu: hideHighlightMenu
|
||||
}, function() {
|
||||
// Update status to let user know options were saved.
|
||||
var status = document.getElementById('status');
|
||||
@ -20,10 +22,12 @@ function save_options() {
|
||||
function restore_options() {
|
||||
chrome.storage.sync.get({
|
||||
hideDickbar: false,
|
||||
disableLazyImages: false
|
||||
disableLazyImages: false,
|
||||
hideHighlightMenu: false
|
||||
}, function(items) {
|
||||
document.getElementById('dickbar').checked = items.hideDickbar;
|
||||
document.getElementById('images').checked = items.disableLazyImages;
|
||||
document.getElementById('highlight').checked = items.hideHighlightMenu;
|
||||
});
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', restore_options);
|
||||
|
Loading…
Reference in New Issue
Block a user