Skip to content

Commit

Permalink
Making cookie implementation simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
TohnoCoding committed Nov 15, 2024
1 parent f1f03de commit aded828
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions js/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ function showChangelogModal() {
$("#darkener").toggleClass("visible-darkener");
}

/**
* Hides the changelog modal from visibility.
*/
function hideChangelogModal() {
setCookie(Config.cookieName, true);
$('#changelogModal').css('top', '-500%');
Expand Down
4 changes: 1 addition & 3 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ $.fn.select2.amd.define('select2/data/customAdapter',
$(async function() {
await fetchGlobalThreshold();
$('#loadingModal').modal('show'); // Show Loading Modal
var cookie =
(getCookie(Config.cookieName) === "true"); // Changelog cookie check
var cookie = getCookie(Config.cookieName); // Changelog cookie check
if(!cookie) { showChangelogModal(); }
else { $("#noticeBoard").css("display", "block"); }
// Load File Prepare
$("#" + Config.file_hidden_id).on("change", (function()
{ loadUploadedFileData(); }));
Expand Down

0 comments on commit aded828

Please sign in to comment.