function drawCalendar() {
	// empty calendar
	$("#calendar").empty();

	// generate grid
	for (let i = 1; i <= 143; i++) {
		// if year column
		if (i % 13 == 1) {
			var cal_y = 1985 + (i - 1) / 13;
			$("#calendar").append("<div class='calendar-year'>" + cal_y + "</div>");
		// draw month card
		} else {
			var cal_m = (i - 1) % 13;
			var current_date = cal_y == year && cal_m == month ? " current" : "";
			var date_data = i < 12 ? " disabled'" : " card' data-year='" + cal_y + "' data-month='" + cal_m + "' onclick='comicJump(this);'";
			$("#calendar").append("<div class='calendar-month" + current_date + date_data + "><span>" + cal_m + "</span></div>");
		}
	}
}
// update and draw calendar - hella inefficient and unnecessary but I can't be bothered rn
update and draw calendar - hella inefficient and unnecessary but I can't be bothered rn
update and draw calendar - hella inefficient and unnecessary but I can ' t be bothered rn
function drawCalendar() {
	$("#calendar").empty();
	for (let i = 1; i <= 143; i++) {
		if (i % 13 == 1) {
			var cal_y = 1985 + (i - 1) / 13;
			$("#calendar").append("<div class='calendar-year'>" + cal_y + "</div>");
		} else {
			var cal_m = (i - 1) % 13;
			var current_date = cal_y == year && cal_m == month ? " current" : "";
			var date_data = i < 12 ? " disabled'" : " card' data-year='" + cal_y + "' data-month='" + cal_m + "' onclick='comicJump(this);'";
			$("#calendar").append("<div class='calendar-month" + current_date + date_data + "><span>" + cal_m + "</span></div>");
		}
	}
}
function drawCalendar ( ) { $ ( "#calendar" ) . empty ( ) ; for ( let i = 1 ; i <= 143 ; i ++ ) { if ( i % 13 == 1 ) { var cal_y = 1985 + ( i - 1 ) / 13 ; $ ( "#calendar" ) . append ( "<div class='calendar-year'>" + cal_y + "</div>" ) ; } else { var cal_m = ( i - 1 ) % 13 ; var current_date = cal_y == year && cal_m == month ? " current" : "" ; var date_data = i < 12 ? " disabled'" : " card' data-year='" + cal_y + "' data-month='" + cal_m + "' onclick='comicJump(this);'" ; $ ( "#calendar" ) . append ( "<div class='calendar-month" + current_date + date_data + "><span>" + cal_m + "</span></div>" ) ; } } }
update and draw calendar - hella inefficient and unnecessary but I can't be bothered rn
update and draw calendar - hella inefficient and unnecessary but I can ' t be bothered rn
// empty calendar // generate grid // if year column // draw month card