Skip to content

Commit

Permalink
Simplified js expression in templates
Browse files Browse the repository at this point in the history
REMARK_URL is required and window.location.origin is not needed.

#806 (comment)
  • Loading branch information
sattellite authored and umputun committed Nov 10, 2020
1 parent 06c3406 commit abe3b0d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/comments.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
var remark_config = {
site_id: query.site_id,
host: '<%= REMARK_URL %>' || window.location.origin,
host: '<%= REMARK_URL %>' ,
url: query.url
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/counter.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<script>
var remark_config = {
site_id: 'remark',
host: '<%= REMARK_URL %>' || window.location.origin,
host: '<%= REMARK_URL %>',
url: 'https://remark42.com/demo/',
components: ['counter']
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
var remark_config = {
site_id: 'remark',
host: '<%= REMARK_URL %>' || window.location.origin,
host: '<%= REMARK_URL %>',
url: 'https://remark42.com/demo/',
components: ['embed', 'counter'],
// __colors__: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/last-comments.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script>
var remark_config = {
site_id: 'remark',
host: '<%= REMARK_URL %>' || window.location.origin,
host: '<%= REMARK_URL %>',
components: ['last-comments']
};
Expand Down

0 comments on commit abe3b0d

Please sign in to comment.