Use includes instead of endsWith (due to query parameters)

This commit is contained in:
Sebastian Serth
2020-11-10 02:26:21 +01:00
parent 2ba6cd7b32
commit 406aeef461

View File

@ -14,7 +14,7 @@ $(document).on('turbolinks:load', function(event) {
CodeOceanEditorRequestForComments
);
if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.data.url.endsWith("/implement")) {
if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.data.url.includes("/implement")) {
if (CodeOceanEditor.isBrowserSupported()) {
$('#alert').hide();
// This call will (amon other things) initializeEditors and load the content except for the last line