diff --git a/src/Common.css b/src/Common.css
index 08bbf0a..d78d138 100644
--- a/src/Common.css
+++ b/src/Common.css
@@ -65,6 +65,13 @@
margin: 0 auto;
}
+.ext-img__warpper.loading {
+ min-height: 100px;
+ background: url('/static/loading.gif') center no-repeat;
+ background-size: 25px 25px;
+ display: block;
+}
+
.left-container .img-link img {
max-height: 500px;
}
diff --git a/src/Common.js b/src/Common.js
index 5ef41e1..d1c99d7 100644
--- a/src/Common.js
+++ b/src/Common.js
@@ -77,6 +77,10 @@ function normalize_url(url) {
return /^https?:\/\//.test(url) ? url : 'http://' + url;
}
+function stop_loading(e) {
+ e.target.parentNode.classList.remove('loading');
+}
+
// props: text, show_pid, color_picker, search_param
export class HighlightedMarkdown extends Component {
render() {
@@ -96,12 +100,16 @@ export class HighlightedMarkdown extends Component {
shouldProcessNode: (node) => node.name === 'img',
processNode(node, index) {
return (
-
+
+
+
);
},
},