Skip to content

Commit

Permalink
Detecting current domain in JS for images URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
parpalak committed Dec 12, 2023
1 parent 368a4f2 commit f0b895d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function __ ($key) {
document.addEventListener('DOMContentLoaded', fn);
}
})(function () {
initTexEditor('<?php echo $service_url; ?>');
initTexEditor();
initTexSite();
});
</script>
Expand Down
3 changes: 2 additions & 1 deletion www/js/init_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ var Renderer = (function () {
};
}());

function initTexEditor(serviceURL) {
function initTexEditor() {
var source = document.querySelector('.editor-text'),
preview = document.getElementById('editor-preview'),
serviceURL = '//' + (window.location.host === 'tex.s2cms.ru' ? 'i.upmath.me' : window.location.host) + '/',
oldOutput;

/**
Expand Down

0 comments on commit f0b895d

Please sign in to comment.