...
 
Commits (2)
......@@ -98,7 +98,9 @@ const style = `
}
img {
display: block;
max-width: 100%;
height: auto;
}
.medium-insert-embeds {
......@@ -113,16 +115,18 @@ const style = `
const injectedJavaScript = `
setTimeout(() => {
const postMessage = window.ReactNativeWebView.postMessage;
postMessage.toString = () => String(Object.hasOwnProperty).replace('hasOwnProperty', 'postMessage');
window.postMessage = postMessage;
window.postMessage(document.body.offsetHeight + 20);
let currentHeight = document.body.scrollHeight;
window.ReactNativeWebView.postMessage(currentHeight + 20);
setTimeout(() => {
window.postMessage(document.body.offsetHeight + 20);
if (currentHeight === document.body.scrollHeight) return;
currentHeight = document.body.scrollHeight;
window.ReactNativeWebView.postMessage(currentHeight + 20);
}, 1000);
},100);
true;
`;
export default class BlogViewHTML extends Component {
......
......@@ -7417,10 +7417,10 @@ react-native-video@react-native-community/react-native-video#c36a9cf2efdb920b86c
prop-types "^15.5.10"
shaka-player "^2.4.4"
react-native-webview@^5.8.1:
version "5.8.1"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-5.8.1.tgz#6f5a83dec55bbc02700155b1a16a668870f14de0"
integrity sha512-b6pSvmjoiWtcz6YspggW02X+BRXJWuquHwkh37BRx1NMW1iwMZA31SnFQvTpPzWYYIb9WF/mRsy2nGtt9C6NIg==
react-native-webview@^5.11.0:
version "5.11.0"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-5.11.0.tgz#7b1eeac7f3ea3a6f7bab3eefc10b272f0a008603"
integrity sha512-8hqq7Gr5tP6seWUJ5G1qmSmSo53hljhXIkZT09SX07pfAw1pbEoIMg7uYvZGk7BVkYiwIO4nkyg+M501E8CL8g==
dependencies:
escape-string-regexp "1.0.5"
invariant "2.2.4"
......