Updates to docs js

This commit is contained in:
Andrew Gioia 2023-05-26 10:49:29 -04:00
parent 496038b4f7
commit 2470b15371
No known key found for this signature in database
GPG Key ID: FC09694A000800C8
2 changed files with 58 additions and 0 deletions

View File

@ -121,6 +121,35 @@ function filterIcons(q) {
$(this).addClass('hidden');
}
}
// check if after a date
} else if (q.substring(0, 6) == 'after:') {
// hide everything right away
$(this).addClass('hidden');
// get and check against the date
date = new Date(q.split(':')[1]);
if (release.getTime() > date.getTime()) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
// check if before a date
} else if (q.substring(0, 7) == 'before:') {
// hide everything right away
$(this).addClass('hidden');
// get and check against the date
date = new Date(q.split(':')[1]);
if (release.getTime() < date.getTime()) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
// otherwise check code/tags for the string
} else {
// show/hide icons based on query index

View File

@ -121,6 +121,35 @@ function filterIcons(q) {
$(this).addClass('hidden');
}
}
// check if after a date
} else if (q.substring(0, 6) == 'after:') {
// hide everything right away
$(this).addClass('hidden');
// get and check against the date
date = new Date(q.split(':')[1]);
if (release.getTime() > date.getTime()) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
// check if before a date
} else if (q.substring(0, 7) == 'before:') {
// hide everything right away
$(this).addClass('hidden');
// get and check against the date
date = new Date(q.split(':')[1]);
if (release.getTime() < date.getTime()) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
// otherwise check code/tags for the string
} else {
// show/hide icons based on query index