Tools

 <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Article Rewriter & Plagiarism Tool</title>

    <style>

        :root {

            --primary-color: #4a6fa5;

            --secondary-color: #6b8cbc;

            --accent-color: #ff6b6b;

            --light-color: #f8f9fa;

            --dark-color: #343a40;

            --success-color: #28a745;

            --warning-color: #ffc107;

            --danger-color: #dc3545;

        }

        

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

        }

        

        body {

            background-color: #f5f7fa;

            color: var(--dark-color);

            line-height: 1.6;

        }

        

        .container {

            max-width: 1200px;

            margin: 0 auto;

            padding: 20px;

        }

        

        header {

            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));

            color: white;

            padding: 20px 0;

            border-radius: 10px;

            margin-bottom: 30px;

            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        }

        

        .header-content {

            display: flex;

            justify-content: space-between;

            align-items: center;

            padding: 0 20px;

        }

        

        h1 {

            font-size: 2.2rem;

            margin-bottom: 10px;

        }

        

        .tagline {

            font-size: 1.1rem;

            opacity: 0.9;

        }

        

        .main-content {

            display: grid;

            grid-template-columns: 1fr 1fr;

            gap: 30px;

        }

        

        @media (max-width: 768px) {

            .main-content {

                grid-template-columns: 1fr;

            }

        }

        

        .card {

            background-color: white;

            border-radius: 10px;

            padding: 25px;

            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);

            margin-bottom: 20px;

        }

        

        .card-title {

            font-size: 1.4rem;

            margin-bottom: 20px;

            color: var(--primary-color);

            border-bottom: 2px solid #eee;

            padding-bottom: 10px;

        }

        

        textarea {

            width: 100%;

            height: 200px;

            padding: 15px;

            border: 1px solid #ddd;

            border-radius: 8px;

            resize: vertical;

            font-size: 1rem;

            margin-bottom: 15px;

            transition: border-color 0.3s;

        }

        

        textarea:focus {

            outline: none;

            border-color: var(--primary-color);

            box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);

        }

        

        .btn {

            display: inline-block;

            background-color: var(--primary-color);

            color: white;

            border: none;

            padding: 12px 20px;

            border-radius: 6px;

            cursor: pointer;

            font-size: 1rem;

            font-weight: 600;

            transition: all 0.3s;

            margin-right: 10px;

            margin-bottom: 10px;

        }

        

        .btn:hover {

            background-color: var(--secondary-color);

            transform: translateY(-2px);

            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

        }

        

        .btn-success {

            background-color: var(--success-color);

        }

        

        .btn-success:hover {

            background-color: #218838;

        }

        

        .btn-warning {

            background-color: var(--warning-color);

            color: var(--dark-color);

        }

        

        .btn-warning:hover {

            background-color: #e0a800;

        }

        

        .btn-danger {

            background-color: var(--danger-color);

        }

        

        .btn-danger:hover {

            background-color: #c82333;

        }

        

        .btn-accent {

            background-color: var(--accent-color);

        }

        

        .btn-accent:hover {

            background-color: #ff5252;

        }

        

        .result-container {

            position: relative;

        }

        

        .word-count {

            position: absolute;

            top: 10px;

            right: 15px;

            background-color: rgba(255, 255, 255, 0.8);

            padding: 5px 10px;

            border-radius: 20px;

            font-size: 0.9rem;

            color: var(--dark-color);

        }

        

        .plagiarism-score {

            display: inline-block;

            padding: 8px 15px;

            border-radius: 20px;

            font-weight: bold;

            margin-top: 10px;

        }

        

        .low-plagiarism {

            background-color: rgba(40, 167, 69, 0.2);

            color: var(--success-color);

        }

        

        .medium-plagiarism {

            background-color: rgba(255, 193, 7, 0.2);

            color: #e0a800;

        }

        

        .high-plagiarism {

            background-color: rgba(220, 53, 69, 0.2);

            color: var(--danger-color);

        }

        

        .tooltip {

            position: relative;

            display: inline-block;

        }

        

        .tooltip .tooltiptext {

            visibility: hidden;

            width: 200px;

            background-color: var(--dark-color);

            color: white;

            text-align: center;

            border-radius: 6px;

            padding: 10px;

            position: absolute;

            z-index: 1;

            bottom: 125%;

            left: 50%;

            margin-left: -100px;

            opacity: 0;

            transition: opacity 0.3s;

            font-size: 0.9rem;

            font-weight: normal;

        }

        

        .tooltip:hover .tooltiptext {

            visibility: visible;

            opacity: 1;

        }

        

        footer {

            text-align: center;

            margin-top: 40px;

            padding: 20px;

            color: #6c757d;

            font-size: 0.9rem;

        }

        

        .feature-list {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            gap: 20px;

            margin-top: 30px;

        }

        

        .feature {

            background-color: white;

            padding: 20px;

            border-radius: 8px;

            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

            text-align: center;

        }

        

        .feature-icon {

            font-size: 2.5rem;

            margin-bottom: 15px;

            color: var(--primary-color);

        }

        

        .notification {

            position: fixed;

            bottom: 20px;

            right: 20px;

            padding: 15px 25px;

            background-color: var(--success-color);

            color: white;

            border-radius: 6px;

            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

            transform: translateY(100px);

            opacity: 0;

            transition: all 0.3s;

            z-index: 1000;

        }

        

        .notification.show {

            transform: translateY(0);

            opacity: 1;

        }

    </style>

</head>

<body>

    <div class="container">

        <header>

            <div class="header-content">

                <div>

                    <h1>Article Rewriter & Plagiarism Tool</h1>

                    <p class="tagline">Rewrite, check plagiarism, and enhance your content in one place</p>

                </div>

            </div>

        </header>

        

        <div class="feature-list">

            <div class="feature">

                <div class="feature-icon">✍️</div>

                <h3>Article Rewriter</h3>

                <p>Automatically rewrite articles while preserving the original meaning</p>

            </div>

            <div class="feature">

                <div class="feature-icon">🔍</div>

                <h3>Plagiarism Checker</h3>

                <p>Check your content for potential plagiarism issues</p>

            </div>

            <div class="feature">

                <div class="feature-icon">🧹</div>

                <h3>Plagiarism Remover</h3>

                <p>Automatically remove plagiarism from your text</p>

            </div>

            <div class="feature">

                <div class="feature-icon">📋</div>

                <h3>Copy Text</h3>

                <p>Easily copy your rewritten content to clipboard</p>

            </div>

        </div>

        

        <div class="main-content">

            <div class="card">

                <h2 class="card-title">Input Text</h2>

                <textarea id="inputText" placeholder="Paste your article here...">Artificial intelligence (AI) is intelligence demonstrated by machines, as opposed to the natural intelligence displayed by animals including humans. Leading AI textbooks define the field as the study of intelligent agents: any system that perceives its environment and takes actions that maximize its chance of achieving its goals. Some popular accounts use the term artificial intelligence to describe machines that mimic cognitive functions that humans associate with the human mind, such as learning and problem solving.</textarea>

                

                <div>

                    <button class="btn" id="rewriteBtn">Rewrite Article</button>

                    <button class="btn btn-warning" id="checkPlagiarismBtn">Check Plagiarism</button>

                    <button class="btn btn-danger" id="removePlagiarismBtn">Remove Plagiarism</button>

                    <button class="btn btn-success" id="clearBtn">Clear Text</button>

                </div>

            </div>

            

            <div class="card">

                <h2 class="card-title">Output Text</h2>

                <div class="result-container">

                    <textarea id="outputText" placeholder="Your rewritten content will appear here..." readonly></textarea>

                    <div class="word-count" id="wordCount">Words: 0</div>

                </div>

                

                <div id="plagiarismResult"></div>

                

                <div>

                    <button class="btn btn-accent" id="copyBtn">Copy Text</button>

                    <button class="btn btn-success" id="downloadBtn">Download as TXT</button>

                    <button class="btn" id="downloadHTMLBtn">Download as HTML</button>

                </div>

            </div>

        </div>

        

        <footer>

            <p>Article Rewriter & Plagiarism Tool &copy; 2023 | All rights reserved</p>

        </footer>

    </div>

    

    <div class="notification" id="notification">Text copied to clipboard!</div>


    <script>

        // DOM Elements

        const inputText = document.getElementById('inputText');

        const outputText = document.getElementById('outputText');

        const rewriteBtn = document.getElementById('rewriteBtn');

        const checkPlagiarismBtn = document.getElementById('checkPlagiarismBtn');

        const removePlagiarismBtn = document.getElementById('removePlagiarismBtn');

        const clearBtn = document.getElementById('clearBtn');

        const copyBtn = document.getElementById('copyBtn');

        const downloadBtn = document.getElementById('downloadBtn');

        const downloadHTMLBtn = document.getElementById('downloadHTMLBtn');

        const wordCount = document.getElementById('wordCount');

        const plagiarismResult = document.getElementById('plagiarismResult');

        const notification = document.getElementById('notification');


        // Update word count

        function updateWordCount() {

            const text = outputText.value;

            const words = text.trim() ? text.trim().split(/\s+/).length : 0;

            wordCount.textContent = `Words: ${words}`;

        }


        // Show notification

        function showNotification(message) {

            notification.textContent = message;

            notification.classList.add('show');

            setTimeout(() => {

                notification.classList.remove('show');

            }, 3000);

        }


        // Rewrite article function

        function rewriteArticle() {

            const text = inputText.value.trim();

            if (!text) {

                showNotification('Please enter some text to rewrite');

                return;

            }


            // Simple rewriting algorithm (in a real app, this would use an API)

            const words = text.split(' ');

            const synonyms = {

                'artificial': 'synthetic',

                'intelligence': 'intellect',

                'demonstrated': 'shown',

                'machines': 'devices',

                'opposed': 'contrasted',

                'natural': 'innate',

                'displayed': 'exhibited',

                'animals': 'creatures',

                'including': 'encompassing',

                'humans': 'people',

                'leading': 'prominent',

                'define': 'describe',

                'field': 'domain',

                'study': 'examination',

                'intelligent': 'smart',

                'agents': 'entities',

                'system': 'framework',

                'perceives': 'observes',

                'environment': 'surroundings',

                'takes': 'executes',

                'actions': 'measures',

                'maximize': 'optimize',

                'chance': 'probability',

                'achieving': 'attaining',

                'goals': 'objectives',

                'popular': 'common',

                'accounts': 'descriptions',

                'use': 'employ',

                'term': 'phrase',

                'describe': 'characterize',

                'mimic': 'imitate',

                'cognitive': 'mental',

                'functions': 'processes',

                'associate': 'link',

                'human': 'people\'s',

                'mind': 'intellect',

                'learning': 'acquiring knowledge',

                'problem': 'issue',

                'solving': 'resolving'

            };


            let rewrittenText = words.map(word => {

                const cleanWord = word.replace(/[.,!?;]/g, '');

                if (synonyms[cleanWord.toLowerCase()]) {

                    return synonyms[cleanWord.toLowerCase()] + word.slice(cleanWord.length);

                }

                return word;

            }).join(' ');


            // Add some sentence structure variation

            const sentences = rewrittenText.split('. ');

            if (sentences.length > 1) {

                // Rearrange some sentences for variety

                const firstSentence = sentences[0];

                const lastSentence = sentences[sentences.length - 1];

                const middleSentences = sentences.slice(1, -1);

                

                // Shuffle middle sentences

                for (let i = middleSentences.length - 1; i > 0; i--) {

                    const j = Math.floor(Math.random() * (i + 1));

                    [middleSentences[i], middleSentences[j]] = [middleSentences[j], middleSentences[i]];

                }

                

                rewrittenText = [firstSentence, ...middleSentences, lastSentence].join('. ');

            }


            outputText.value = rewrittenText;

            updateWordCount();

            showNotification('Article rewritten successfully!');

        }


        // Check plagiarism function

        function checkPlagiarism() {

            const text = inputText.value.trim();

            if (!text) {

                showNotification('Please enter some text to check');

                return;

            }


            // Simulate plagiarism check (in a real app, this would use an API)

            const plagiarismScore = Math.floor(Math.random() * 30); // Random score for demo

            

            let scoreClass = 'low-plagiarism';

            let message = 'Low plagiarism detected';

            

            if (plagiarismScore > 15) {

                scoreClass = 'medium-plagiarism';

                message = 'Medium plagiarism detected';

            }

            

            if (plagiarismScore > 25) {

                scoreClass = 'high-plagiarism';

                message = 'High plagiarism detected';

            }

            

            plagiarismResult.innerHTML = `

                <div class="plagiarism-score ${scoreClass}">

                    Plagiarism Score: ${plagiarismScore}% - ${message}

                </div>

            `;

            

            showNotification('Plagiarism check completed!');

        }


        // Remove plagiarism function

        function removePlagiarism() {

            const text = inputText.value.trim();

            if (!text) {

                showNotification('Please enter some text to process');

                return;

            }


            // For demo purposes, we'll just rewrite the text more extensively

            rewriteArticle();

            

            // Add a note that plagiarism has been "removed"

            outputText.value += "\n\n[Plagiarism has been removed from this text]";

            updateWordCount();

            

            plagiarismResult.innerHTML = `

                <div class="plagiarism-score low-plagiarism">

                    Plagiarism Score: 2% - Low plagiarism detected

                </div>

            `;

            

            showNotification('Plagiarism removed successfully!');

        }


        // Copy text function

        function copyText() {

            const text = outputText.value;

            if (!text) {

                showNotification('No text to copy');

                return;

            }


            navigator.clipboard.writeText(text)

                .then(() => {

                    showNotification('Text copied to clipboard!');

                })

                .catch(err => {

                    console.error('Failed to copy text: ', err);

                    showNotification('Failed to copy text');

                });

        }


        // Download as TXT function

        function downloadAsTxt() {

            const text = outputText.value;

            if (!text) {

                showNotification('No text to download');

                return;

            }


            const blob = new Blob([text], { type: 'text/plain' });

            const url = URL.createObjectURL(blob);

            const a = document.createElement('a');

            a.href = url;

            a.download = 'rewritten-article.txt';

            document.body.appendChild(a);

            a.click();

            document.body.removeChild(a);

            URL.revokeObjectURL(url);

            

            showNotification('Text downloaded as TXT!');

        }


        // Download as HTML function

        function downloadAsHTML() {

            const text = outputText.value;

            if (!text) {

                showNotification('No text to download');

                return;

            }


            const htmlContent = `

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Rewritten Article</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            line-height: 1.6;

            max-width: 800px;

            margin: 0 auto;

            padding: 20px;

            color: #333;

        }

        h1 {

            color: #4a6fa5;

            border-bottom: 2px solid #eee;

            padding-bottom: 10px;

        }

    </style>

</head>

<body>

    <h1>Rewritten Article</h1>

    <div>${text.replace(/\n/g, '<br>')}</div>

</body>

</html>`;


            const blob = new Blob([htmlContent], { type: 'text/html' });

            const url = URL.createObjectURL(blob);

            const a = document.createElement('a');

            a.href = url;

            a.download = 'rewritten-article.html';

            document.body.appendChild(a);

            a.click();

            document.body.removeChild(a);

            URL.revokeObjectURL(url);

            

            showNotification('Text downloaded as HTML!');

        }


        // Clear text function

        function clearText() {

            inputText.value = '';

            outputText.value = '';

            plagiarismResult.innerHTML = '';

            updateWordCount();

            showNotification('Text cleared!');

        }


        // Event listeners

        rewriteBtn.addEventListener('click', rewriteArticle);

        checkPlagiarismBtn.addEventListener('click', checkPlagiarism);

        removePlagiarismBtn.addEventListener('click', removePlagiarism);

        copyBtn.addEventListener('click', copyText);

        downloadBtn.addEventListener('click', downloadAsTxt);

        downloadHTMLBtn.addEventListener('click', downloadAsHTML);

        clearBtn.addEventListener('click', clearText);


        // Initialize

        updateWordCount();

    </script>

</body>

</html>

Comments

Popular posts from this blog

Snake life style