Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9841b81e4 | ||
|
|
dfed7e16ba |
@@ -466,16 +466,7 @@ Add this snippet to the bottom of web page:
|
||||
// but your users won't have interface for subscription
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
(function(c) {
|
||||
for(var i = 0; i < c.length; i++){
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = remark_config.host + '/web/' +c[i] +'.js';
|
||||
s.defer = true;
|
||||
(d.head || d.body).appendChild(s);
|
||||
}
|
||||
})(remark_config.components || ['embed']);
|
||||
</script>
|
||||
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>
|
||||
```
|
||||
|
||||
And then add this node in the place where you want to see Remark42 widget:
|
||||
@@ -521,15 +512,6 @@ Add this snippet to the bottom of web page, or adjust already present `remark_co
|
||||
site_id: 'YOUR_SITE_ID',
|
||||
components: ['last-comments']
|
||||
};
|
||||
|
||||
(function(c) {
|
||||
for(var i = 0; i < c.length; i++){
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = remark_config.host + '/web/' +c[i] +'.js';
|
||||
s.defer = true;
|
||||
(d.head || d.body).appendChild(s);
|
||||
}
|
||||
})(remark_config.components || ['embed']);
|
||||
</script>
|
||||
```
|
||||
|
||||
@@ -554,15 +536,6 @@ Add this snippet to the bottom of web page, or adjust already present `remark_co
|
||||
site_id: 'YOUR_SITE_ID',
|
||||
components: ['counter']
|
||||
};
|
||||
|
||||
(function(c) {
|
||||
for(var i = 0; i < c.length; i++){
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = remark_config.host + '/web/' +c[i] +'.js';
|
||||
s.defer = true;
|
||||
(d.head || d.body).appendChild(s);
|
||||
}
|
||||
})(remark_config.components || ['embed']);
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ async function init(): Promise<void> {
|
||||
throw new Error('Remark42: Site ID is undefined.');
|
||||
}
|
||||
|
||||
const styles = document.createElement('link');
|
||||
styles.href = `${BASE_URL}/web/last-comments.css`;
|
||||
styles.rel = 'stylesheet';
|
||||
(document.head || document.body).appendChild(styles);
|
||||
|
||||
(Array.from(nodes) as HTMLElement[]).forEach((node) => {
|
||||
const max = (node.dataset.max && parseInt(node.dataset.max, 10)) || max_last_comments || DEFAULT_LAST_COMMENTS_MAX;
|
||||
const locale = getLocale(window.remark_config);
|
||||
|
||||
Reference in New Issue
Block a user