4,456
edits
No edit summary |
No edit summary |
||
Line 176: | Line 176: | ||
if ($("#home").length > 0) { | if ($("#home").length > 0) { | ||
// This code will only run only on the homepage. | // This code will only run only on the homepage. | ||
$(".home-block-view").show(); | $(".home-block-view").show(); | ||
$(".home-chronicle-block-button, .home-block-view-button").addClass( | $(".home-chronicle-block-button, .home-block-view-button").addClass( | ||
Line 184: | Line 182: | ||
); | ); | ||
// Initially hide list view sorting buttons and set the default sorted view for block | // Initially hide list view sorting buttons and set the default sorted view for block | ||
$( | $( | ||
Line 197: | Line 194: | ||
$(".home-list-view-button").click(function () { | $(".home-list-view-button").click(function () { | ||
$(".home-list-sorting-buttons").css("display", "flex"); | $(".home-list-sorting-buttons").css("display", "flex"); | ||
// Switching view classes | // Switching view classes | ||
Line 1,691: | Line 1,687: | ||
}); | }); | ||
} | } | ||
if ($("#show-article-wrapper-entry").length) { | if ($("#show-article-wrapper-entry").length) { | ||
// Your existing formatParagraphs function | // Your existing formatParagraphs function | ||
function formatParagraphs(text) { | function formatParagraphs(text) { | ||
Line 1,785: | Line 1,776: | ||
// Check if #submit button exists and add event listener if it does | // Check if #submit button exists and add event listener if it does | ||
var submitButton = document.querySelector("#submit"); | var submitButton = document.querySelector("#submit"); | ||
if (submitButton) { | if (submitButton) { | ||
// Add click event listener | // Add click event listener | ||
submitButton.addEventListener("click", function (event) { | submitButton.addEventListener("click", function (event) { | ||
event.preventDefault(); // Prevent the default link behavior | event.preventDefault(); // Prevent the default link behavior | ||