Merge branch 'feat/url-cleaner' into chore/all-my-stuffs

# Conflicts:
#	package.json
#	pnpm-lock.yaml
#	src/tools/index.ts
This commit is contained in:
ShareVB committed 2024-11-03 23:09:02 +01:00
commit 8519694fa6
5 files changed
+67 -1

No files matched your search

+1
View File
@@ -296,6 +296,7 @@
"svg-to-url": "^4.0.0",
"tesseract.js": "^5.0.4",
"sshpk": "^1.18.0",
"tidy-url": "^1.15.1",
"ua-parser-js": "^1.0.35",
"ulid": "^2.3.0",
"unicode-emoji-json": "^0.4.0",
+8 -1
View File
@@ -602,6 +602,9 @@ dependencies:
tesseract.js:
specifier: ^5.0.4
version: 5.1.1
tidy-url:
specifier: ^1.15.1
version: 1.18.3
turndown:
specifier: ^7.1.2
version: 7.2.0
@@ -1054,7 +1057,7 @@ packages:
dependencies:
'@babel/types': 7.23.0
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.18
'@jridgewell/trace-mapping': 0.3.20
jsesc: 2.5.2
dev: true
@@ -14925,6 +14928,10 @@ packages:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
dev: true
/tidy-url@1.18.3:
resolution: {integrity: sha512-NnbmullqE/3loiDoopNltfLb/v6EhX5GYNUVU4EuZjnDjh/NIBzy5dHnhvH3EfIAnZZZMf3cW0HgNw9E+easyg==}
dev: false
/time-span@5.1.0:
resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==}
engines: {node: '>=12'}
+2
View File
@@ -132,6 +132,7 @@ import { tool as pgpEncryption } from './pgp-encryption';
import { tool as pgpKeygen } from './pgp-keygen';
import { tool as portNumbers } from './port-numbers';
import { tool as rsaEncryption } from './rsa-encryption';
import { tool as urlCleaner } from './url-cleaner';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -336,6 +337,7 @@ export const toolsByCategory: ToolCategory[] = [
urlEncoder,
htmlEntities,
urlParser,
urlCleaner,
deviceInformation,
basicAuthGenerator,
htpasswdGenerator,
+12
View File
@@ -0,0 +1,12 @@
import { ClearAll } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Url Cleaner',
path: '/url-cleaner',
description: 'Clean Ads tracker, UTM, Facebook and other ads provider parameters from an URL',
keywords: ['url', 'cleaner', 'utm', 'fbclip'],
component: () => import('./url-cleaner.vue'),
icon: ClearAll,
createdAt: new Date('2024-03-13'),
});
+44
View File
@@ -0,0 +1,44 @@
<script setup lang="ts">
import { TidyURL } from 'tidy-url';
import { Check as CheckIcon, LetterX as CrossIcon } from '@vicons/tabler';
import TextareaCopyable from '@/components/TextareaCopyable.vue';
import { withDefaultOnError } from '@/utils/defaults';
const inputUrl = ref('');
const cleanedUrl = computed(() => withDefaultOnError(() => TidyURL.clean(inputUrl.value), undefined));
const isClean = computed(() => withDefaultOnError(() => TidyURL.clean(inputUrl.value)?.url === inputUrl.value, false));
</script>
<template>
<c-card title="Clean url">
<c-input-text
v-model:value="inputUrl"
placeholder="Put your url here..."
label="Url to clean"
/>
<n-divider />
<div v-if="inputUrl">
<n-p v-if="isClean" text-center>
<n-icon color="green">
<CheckIcon />
</n-icon>
Is clean
</n-p>
<n-p v-if="!isClean" text-center>
<n-icon color="red">
<CrossIcon />
</n-icon>
Was not clean
</n-p>
<TextareaCopyable
label="Cleaned url"
:value="cleanedUrl?.url || ''"
placeholder="The cleaned url will be here"
mb-5
mt-5
/>
</div>
</c-card>
</template>