Skip to content

Commit

Permalink
automatically return back to start page when /thread is called withou…
Browse files Browse the repository at this point in the history
…t params (closes #4)
  • Loading branch information
RealDekkia committed Apr 14, 2024
1 parent 05f3fc0 commit 901ed65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thread/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const threadUnroll = {
initPage: function () {
var params = new URLSearchParams(window.location.search);
if (params.size <= 1) {
document.location = "../";
} else {
var instanceUri = params.get("uri");
var statusID = params.get("id");
Expand All @@ -11,6 +12,7 @@ const threadUnroll = {
threadUnroll.initApi(instanceUri);
threadUnroll.getAllStatuses(statusID, [], threadUnroll.drawstatuses);
} else {
document.location = "../";
}
}
},
Expand Down

0 comments on commit 901ed65

Please sign in to comment.