mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 21:01:31 +03:00
remove imageviewer from external links and video thumbnails
This commit is contained in:
parent
bf129bbf0a
commit
147ec5a4c1
@ -1,6 +1,6 @@
|
||||
export default `
|
||||
var images = document.getElementsByTagName("IMG");
|
||||
for (i = 0; i < images.length; i++) {
|
||||
for (i = 0; i < images.length; i++) {
|
||||
var result = {
|
||||
type: 'image',
|
||||
href: images[i].getAttribute("src") || ''
|
||||
@ -9,9 +9,10 @@ for (i = 0; i < images.length; i++) {
|
||||
var resultStr = JSON.stringify(JSON.stringify(result));
|
||||
|
||||
var message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
|
||||
images[i].setAttribute("onClick", message);
|
||||
if (!images[i].classList.contains("video-thumbnail") && !images[i].parentNode.classList.contains("markdown-external-link")) {
|
||||
images[i].setAttribute("onClick", message);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('click', function(event) {
|
||||
var el = event.target;
|
||||
// A element can be wrapped with inline element. Look parent elements.
|
||||
|
Loading…
Reference in New Issue
Block a user