undo filter

This commit is contained in:
Russell2259
2024-02-08 22:01:33 +00:00
parent 32571322ff
commit d5e81d012f
5 changed files with 3 additions and 15 deletions
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+1 -1
View File
@@ -159,7 +159,7 @@ if (location.pathname === '/') {
}, 1000);
});
document.querySelector('.featured').src = '/assets/img/wide/99balls.jpg';
document.querySelector('.featured').src = '/assets/img/wide/99balls.png';
}).catch(e => new PolarisError('Failed to load featured game.'));
const logHeight = () => {
+2 -13
View File
@@ -3,8 +3,6 @@ import { createViewPage, isValidURL } from './utils.js';
const load = async () => {
const form = document.querySelector('#wpf');
const query = document.querySelector('#query');
const response = await fetch('./assets/JSON/blacklist.json');
const blacklist = await response.json();
form.addEventListener('submit', async (e) => {
e.preventDefault();
@@ -14,22 +12,13 @@ const load = async () => {
document.body.style.opacity = '0.7';
umami.track('query-' + query.value);
if (containsBlacklistedTerm(query.value, blacklist)) {
alert("You're downright weird.\nThis search contains a blacklisted term.");
return;
} else {
setTimeout(() => createViewPage({
target: url,
proxied: true,
title: 'Search Results'
}), 500);
}
});
}
const containsBlacklistedTerm = (value, blacklist) => {
return blacklist.some(entry => value.includes(entry));
}
export default { load };
export default { load };