Skip to content

Commit

Permalink
Codefactor issues 2
Browse files Browse the repository at this point in the history
  • Loading branch information
inventionpro committed Dec 15, 2024
1 parent 50449a9 commit 41d18d6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apis/fandom.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
data = data.replaceAll(' target="_blank" rel="nofollow noreferrer noopener"', '')
data = data.replaceAll(/ class="external.+?"/g, '')
// Remove non necesary new lines
data = data.split("\n").filter(e=>{return e.replaceAll(/ | |\n/g, '').length}).join("\n")
data = data.split("\n").filter(e=>{return e.replaceAll(/ |\t|\n/g, '').length}).join("\n")
// Make prettier
data = data.replaceAll("<p><br>", "<p>")
data = data.replaceAll("<p><br />", "<p>")
Expand Down Expand Up @@ -121,7 +121,7 @@ module.exports = {
}

// Remove non necesary new lines
data = data.split("\n").filter(e=>{return e.replaceAll(/ | |\n/g, '').length}).join("\n")
data = data.split("\n").filter(e=>{return e.replaceAll(/ |\t|\n/g, '').length}).join("\n")
} catch (err) {
res.error('Error formatting data', 500)
return;
Expand Down
2 changes: 1 addition & 1 deletion apis/greyscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
image: 'data:image/png;base64,' + outputBuffer.toString('base64')
})
})
.catch(err => {
.catch(() => {
res.error('Could not generate', 500);
return;
})
Expand Down
2 changes: 1 addition & 1 deletion apis/gun.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
})
})
})
.catch(err => {
.catch(() => {
res.error('Could not generate', 500);
return;
})
Expand Down
2 changes: 1 addition & 1 deletion apis/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
image: 'data:image/png;base64,' + outputBuffer.toString('base64')
})
})
.catch(err => {
.catch(() => {
res.error('Could not generate', 500);
return;
})
Expand Down
2 changes: 1 addition & 1 deletion apis/jail.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
})
})
})
.catch(err => {
.catch(() => {
res.error('Could not generate', 500);
return;
})
Expand Down
2 changes: 1 addition & 1 deletion apis/uncover.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
})
})
})
.catch(err => {
.catch(() => {
res.error('Could not generate', 500);
return;
})
Expand Down
2 changes: 1 addition & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1>Endpoints ({{count}})</h1>
<svg onclick="search()" height="14" style="margin-right:10px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#fff" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>
<script>
function search() {
location.href = `./search?q=${document.getElementById('search').value}`;
location.href = `./search?q=${encodeURIComponent(document.getElementById('search').value)}`;
}
</script>
</div>
Expand Down

0 comments on commit 41d18d6

Please sign in to comment.