|
|
@@ -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); |
|
|
|
} |