mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 22:07:10 -04:00
feat(new tool): URL Cleaner
URL Cleaner Remove fbclip, utm params and other tracking parameters
This commit is contained in:
parent
d3b32cc14e
commit
e94cebfe19
5 changed files with 77 additions and 6 deletions
|
@ -6,6 +6,7 @@ import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
|||
|
||||
import { tool as textToUnicode } from './text-to-unicode';
|
||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||
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';
|
||||
|
@ -115,6 +116,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||
urlEncoder,
|
||||
htmlEntities,
|
||||
urlParser,
|
||||
urlCleaner,
|
||||
deviceInformation,
|
||||
basicAuthGenerator,
|
||||
metaTagGenerator,
|
||||
|
|
12
src/tools/url-cleaner/index.ts
Normal file
12
src/tools/url-cleaner/index.ts
Normal 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'),
|
||||
});
|
49
src/tools/url-cleaner/url-cleaner.vue
Normal file
49
src/tools/url-cleaner/url-cleaner.vue
Normal file
|
@ -0,0 +1,49 @@
|
|||
<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
|
||||
/>
|
||||
<n-p text-center>
|
||||
<n-a :href="cleanedUrl?.url" target="_blank" rel="noopener noreferrer">
|
||||
{{ cleanedUrl?.url }}
|
||||
</n-a>
|
||||
</n-p>
|
||||
</div>
|
||||
</c-card>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue