mirror of
https://github.com/thebaer/MMRA
synced 2024-11-13 10:11:01 +00:00
use mutation observer to watch for body change & remove footer
This commit is contained in:
parent
e9b8eb885f
commit
7b1416ed76
@ -20,6 +20,12 @@ var hideDickbar = function() {
|
||||
document.querySelector('footer > .container:first-child').style.display = 'none';
|
||||
};
|
||||
|
||||
var observer = new MutationObserver(function(mutations){
|
||||
mutations.forEach(makeReadable);
|
||||
});
|
||||
|
||||
var config = {attributes: true};
|
||||
|
||||
// Only run this on Medium sites.
|
||||
// Ensure that by checking for <meta property="al:ios:app_name" content="Medium"> in the document <head />
|
||||
var metaCheck = document.head.querySelector('meta[property="al:ios:app_name"]');
|
||||
@ -31,4 +37,6 @@ if (metaCheck != null && metaCheck.content == "Medium") {
|
||||
hideDickbar();
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(document.querySelector('body'), target);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user