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

Merge branch 'kgdiem-master'

This commit is contained in:
Matt Baer 2017-08-31 19:03:13 -04:00
commit 921b8a92ee

View File

@ -38,6 +38,12 @@ var disableLazyLoading = function() {
}
};
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"]');
@ -52,4 +58,6 @@ if (metaCheck != null && metaCheck.content == "Medium") {
disableLazyLoading();
}
});
observer.observe(document.querySelector('body'), config);
}