mirror of
https://github.com/thebaer/MMRA
synced 2024-11-13 10:11:01 +00:00
Merge pull request #10 from panckreous/ridiculous-header
Add option to resize ridiculous massive headers
This commit is contained in:
commit
92cd527e93
14
content.js
14
content.js
@ -38,8 +38,19 @@ var disableLazyLoading = function() {
|
||||
}
|
||||
};
|
||||
|
||||
var shrinkHeaderImages = function() {
|
||||
var ridiculousHeaderImage = document.querySelector('figure.graf--layoutFillWidth');
|
||||
if (ridiculousHeaderImage != null) {
|
||||
ridiculousHeaderImage.style.maxWidth = '700px';
|
||||
ridiculousHeaderImage.style.margin = '0 auto';
|
||||
}
|
||||
}
|
||||
|
||||
var observer = new MutationObserver(function(mutations){
|
||||
mutations.forEach(makeReadable);
|
||||
mutations.forEach(function(){
|
||||
makeReadable();
|
||||
shrinkHeaderImages();
|
||||
});
|
||||
});
|
||||
|
||||
var config = {attributes: true};
|
||||
@ -49,6 +60,7 @@ var config = {attributes: true};
|
||||
var metaCheck = document.head.querySelector('meta[property="al:ios:app_name"]');
|
||||
if (metaCheck != null && metaCheck.content == "Medium") {
|
||||
makeReadable();
|
||||
shrinkHeaderImages();
|
||||
|
||||
chrome.storage.sync.get(null, function(items) {
|
||||
if (items.hideDickbar) {
|
||||
|
@ -37,6 +37,10 @@
|
||||
<input type="checkbox" checked="checked" disabled="disabled"> Hide bottom <em>Get Updates</em> bar
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" checked="checked" disabled="disabled"> Make massive header images less ridiculous
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
|
||||
<p id="status"></p>
|
||||
|
Loading…
Reference in New Issue
Block a user