{"id":20,"date":"2026-05-10T10:25:13","date_gmt":"2026-05-10T10:25:13","guid":{"rendered":"https:\/\/tinbamien.com\/?page_id=20"},"modified":"2026-05-10T10:25:13","modified_gmt":"2026-05-10T10:25:13","slug":"lay-lan-luot-2","status":"publish","type":"page","link":"https:\/\/tinbamien.com\/?page_id=20","title":{"rendered":"lay lan luot 2"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"vi\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n    <title>Cloud Content Manager v14<\/title>\n    <script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n    \n    <style>\n        body { \n            -webkit-tap-highlight-color: transparent; \n            margin: 0; \n            padding: 0; \n            background-color: #f1f5f9; \n            font-family: 'Inter', system-ui, -apple-system, sans-serif;\n            overscroll-behavior-y: contain;\n            color: #1e293b;\n        }\n        .app-container { max-width: 500px; margin: 0 auto; padding: 20px; }\n        \n        .card { \n            background: white; \n            border-radius: 1.5rem; \n            padding: 1.5rem; \n            border: 1px solid #e2e8f0; \n            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); \n            margin-bottom: 1.5rem; \n        }\n\n        .btn-primary { \n            width: 100%; \n            background: #2563eb; \n            color: white; \n            padding: 1.25rem; \n            border-radius: 1rem; \n            font-weight: 800; \n            cursor: pointer; \n            border: none; \n            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);\n            text-transform: uppercase;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            gap: 10px;\n        }\n        .btn-primary:active { transform: scale(0.97); background: #1d4ed8; }\n        \n        .result-card { \n            background: #ffffff; \n            border-radius: 2rem; \n            padding: 1.5rem; \n            display: none; \n            animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n            box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);\n            border: 2px solid #e2e8f0;\n        }\n\n        @keyframes slideUp { \n            from { opacity: 0; transform: translateY(20px); } \n            to { opacity: 1; transform: translateY(0); } \n        }\n\n        .content-display-box {\n            background: #f8fafc;\n            border: 1px solid #e2e8f0;\n            border-radius: 1rem;\n            padding: 1rem;\n            min-height: 80px;\n            white-space: pre-wrap;\n            word-break: break-word;\n            font-size: 0.95rem;\n            line-height: 1.5;\n            color: #334155;\n            margin-bottom: 1rem;\n        }\n\n        .download-bar {\n            background: #ecfdf5;\n            border: 1px solid #a7f3d0;\n            padding: 1rem;\n            border-radius: 1rem;\n            display: flex;\n            flex-direction: column;\n            gap: 10px;\n        }\n\n        textarea { \n            width: 100%; \n            height: 160px; \n            padding: 1rem; \n            background: #f8fafc; \n            border: 2px solid #e2e8f0; \n            border-radius: 1rem; \n            font-size: 14px; \n            outline: none; \n            margin-bottom: 1rem; \n            resize: none; \n        }\n\n        .toast { \n            position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); \n            background: #1e293b; color: white; padding: 12px 24px; \n            border-radius: 50px; font-size: 13px; font-weight: 600; display: none; z-index: 1000; \n        }\n        \n        .ios-hint {\n            font-size: 10px;\n            color: #059669;\n            font-weight: 600;\n            margin-top: 4px;\n            line-height: 1.3;\n        }\n\n        .status-badge {\n            display: inline-flex;\n            align-items: center;\n            background: white;\n            padding: 4px 12px;\n            border-radius: 99px;\n            border: 1px solid #e2e8f0;\n            font-size: 11px;\n            font-weight: 700;\n        }\n        .dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"app-container\">\n        <div class=\"flex justify-between items-center mb-6\">\n            <div>\n                <h1 class=\"text-xl font-black text-slate-800 tracking-tight\">Cloud Manager<\/h1>\n                <div class=\"status-badge mt-1\">\n                    <span id=\"status-dot\" class=\"dot bg-slate-300\"><\/span>\n                    <span id=\"sync-text\" class=\"text-slate-500 uppercase\">\u0110ANG K\u1ebeT N\u1ed0I<\/span>\n                <\/div>\n            <\/div>\n            <div class=\"text-right\">\n                <span id=\"line-count\" class=\"bg-slate-800 text-white px-3 py-1 rounded-lg text-[10px] font-black shadow-lg uppercase\">0 M\u1ee5c<\/span>\n            <\/div>\n        <\/div>\n\n        <div class=\"card\">\n            <p class=\"text-[11px] font-bold text-slate-400 uppercase mb-2 tracking-widest px-1\">D\u1eef li\u1ec7u (N\u1ed9i dung | Link)<\/p>\n            <textarea id=\"input-list\" placeholder=\"N\u1ed9i dung... | https:\/\/link.com&#10;&#10;-- C\u00e1ch m\u1ed7i m\u1ee5c b\u1eb1ng 1 d\u00f2ng tr\u1ed1ng --\"><\/textarea>\n            <button id=\"next-btn\" class=\"btn-primary\">\n                <span>L\u1ea5y d\u1eef li\u1ec7u ti\u1ebfp theo<\/span>\n                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\"><polyline points=\"13 17 18 12 13 7\"><\/polyline><polyline points=\"6 17 11 12 6 7\"><\/polyline><\/svg>\n            <\/button>\n        <\/div>\n\n        <div id=\"result-area\" class=\"result-card\">\n            <div class=\"mb-4\">\n                <div class=\"flex justify-between items-center mb-2\">\n                    <span class=\"text-[10px] font-black text-slate-400 uppercase tracking-widest\">N\u1ed9i dung hi\u1ec3n th\u1ecb<\/span>\n                    <button id=\"copy-content\" class=\"text-[10px] font-bold text-blue-600 uppercase\">Sao ch\u00e9p<\/button>\n                <\/div>\n                <div id=\"content-display\" class=\"content-display-box\">&#8212;<\/div>\n            <\/div>\n\n            <div class=\"download-bar\">\n                <div class=\"flex justify-between items-center\">\n                    <div class=\"overflow-hidden flex-1 mr-4\">\n                        <p class=\"text-[9px] text-emerald-600 font-black uppercase tracking-widest mb-1\">T\u1ec7p \u0111\u00ednh k\u00e8m<\/p>\n                        <p id=\"link-display\" class=\"text-xs font-bold truncate text-emerald-800 italic\">Ch\u01b0a c\u00f3 link<\/p>\n                    <\/div>\n                    <button id=\"download-btn\" class=\"bg-emerald-600 text-white px-6 py-3 rounded-xl text-xs font-black shadow-md active:scale-90 transition-transform\">T\u1ea2I V\u1ec0<\/button>\n                <\/div>\n                <div id=\"ios-instruction\" class=\"ios-hint hidden\">\n                    \ud83d\udca1 <b>M\u1eb9o iOS:<\/b> Sau khi nh\u1ea5n T\u1ea3i v\u1ec1 -> Nh\u1ea5n v\u00e0o icon T\u1ea3i v\u1ec1 c\u1ee7a Safari -> M\u1edf file -> Nh\u1ea5n n\u00fat Share (G\u00f3c d\u01b0\u1edbi) -> Ch\u1ecdn &#8220;L\u01b0u h\u00ecnh \u1ea3nh&#8221;.\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div id=\"toast\" class=\"toast\">\u0110\u00c3 SAO CH\u00c9P<\/div>\n\n    <script type=\"module\">\n        import { initializeApp } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-app.js\";\n        import { getAuth, signInAnonymously, onAuthStateChanged } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-auth.js\";\n        import { getFirestore, doc, setDoc, onSnapshot } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-firestore.js\";\n\n        const firebaseConfig = {\n            apiKey: \"AIzaSyDUy50OlaitdvyhIqowwKZL53m4suwZxME\",\n            authDomain: \"hiep--3.firebaseapp.com\",\n            projectId: \"hiep--3\",\n            storageBucket: \"hiep--3.firebasestorage.app\",\n            appId: \"1:916863840087:web:b3af001ccf32b0114f5812\"\n        };\n\n        const APP_ID = 'hiep-download-manager-v13';\n        let db, auth, currentUser, saveDebounce, currentDownloadLink = '';\n\n        const init = async () => {\n            try {\n                const app = initializeApp(firebaseConfig);\n                auth = getAuth(app);\n                db = getFirestore(app);\n\n                onAuthStateChanged(auth, (user) => {\n                    if (user) {\n                        currentUser = user;\n                        document.getElementById('status-dot').className = 'dot bg-emerald-500 shadow-[0_0_8px_#10b981]';\n                        document.getElementById('sync-text').innerText = 'TR\u1ef0C TUY\u1ebeN';\n                        setupSync();\n                    } else {\n                        signInAnonymously(auth).catch(() => {});\n                    }\n                });\n            } catch (e) { console.error(e); }\n        };\n\n        function setupSync() {\n            onSnapshot(doc(db, 'clouds', APP_ID), (docSnap) => {\n                const area = document.getElementById('input-list');\n                if (docSnap.exists() && document.activeElement !== area) {\n                    area.value = docSnap.data().list || '';\n                    updateItemCount();\n                }\n            });\n        }\n\n        async function syncToCloud(content) {\n            if (!currentUser) return;\n            try { await setDoc(doc(db, 'clouds', APP_ID), { list: content, updatedAt: Date.now() }, { merge: true }); } catch (e) {}\n        }\n\n        function updateItemCount() {\n            const val = document.getElementById('input-list').value.trim();\n            const items = val ? val.split(\/\\n\\s*\\n\/) : [];\n            document.getElementById('line-count').innerText = items.length + ' M\u1ee4C';\n        }\n\n        function showToast(msg) {\n            const t = document.getElementById('toast');\n            t.innerText = msg;\n            t.style.display = 'block';\n            setTimeout(() => t.style.display = 'none', 2000);\n        }\n\n        document.addEventListener('DOMContentLoaded', () => {\n            init();\n            const area = document.getElementById('input-list');\n            \n            \/\/ Hi\u1ec7n h\u01b0\u1edbng d\u1eabn n\u1ebfu l\u00e0 iOS\n            const isIOS = \/iPad|iPhone|iPod\/.test(navigator.userAgent) && !window.MSStream;\n            if (isIOS) document.getElementById('ios-instruction').classList.remove('hidden');\n\n            area.oninput = () => {\n                updateItemCount();\n                clearTimeout(saveDebounce);\n                saveDebounce = setTimeout(() => syncToCloud(area.value), 1000);\n            };\n\n            document.getElementById('next-btn').onclick = () => {\n                const rawValue = area.value.trim();\n                if (!rawValue) return;\n\n                const items = rawValue.split(\/\\n\\s*\\n\/);\n                const currentItem = items.shift();\n                const remainder = items.join('\\n\\n');\n\n                area.value = remainder;\n                syncToCloud(remainder);\n                updateItemCount();\n\n                const lastPipeIndex = currentItem.lastIndexOf('|');\n                let content = lastPipeIndex !== -1 ? currentItem.substring(0, lastPipeIndex).trim() : currentItem.trim();\n                let link = lastPipeIndex !== -1 ? currentItem.substring(lastPipeIndex + 1).trim() : '';\n\n                document.getElementById('content-display').innerText = content;\n                currentDownloadLink = link;\n                document.getElementById('link-display').innerText = link || 'Kh\u00f4ng c\u00f3 link';\n                document.getElementById('result-area').style.display = 'block';\n                document.getElementById('result-area').scrollIntoView({ behavior: 'smooth' });\n            };\n\n            document.getElementById('download-btn').onclick = () => {\n                if (!currentDownloadLink) return showToast('KH\u00d4NG C\u00d3 LINK');\n                \n                let finalUrl = currentDownloadLink;\n                if (!finalUrl.startsWith('http')) finalUrl = 'https:\/\/' + finalUrl;\n\n                \/\/ X\u1eed l\u00fd Google Drive th\u00e0nh link t\u1ea3i tr\u1ef1c ti\u1ebfp\n                if (finalUrl.includes('drive.google.com')) {\n                    const fileIdMatch = finalUrl.match(\/\\\/d\\\/([^\\\/]+)\/) || finalUrl.match(\/id=([^\\&]+)\/);\n                    if (fileIdMatch && fileIdMatch[1]) {\n                        finalUrl = `https:\/\/drive.google.com\/uc?export=download&id=${fileIdMatch[1]}`;\n                    }\n                }\n\n                \/\/ C\u00e1ch t\u1ed1t nh\u1ea5t \u0111\u1ec3 iOS hi\u1ec7n b\u1ea3ng h\u1ecfi t\u1ea3i v\u1ec1 l\u00e0 m\u1edf link tr\u1ef1c ti\u1ebfp ho\u1eb7c d\u00f9ng th\u1ebb <a>\n                const a = document.createElement('a');\n                a.href = finalUrl;\n                a.setAttribute('download', 'file_image');\n                a.style.display = 'none';\n                document.body.appendChild(a);\n                a.click();\n                setTimeout(() => document.body.removeChild(a), 100);\n\n                showToast(isIOS ? '\u0110ANG K\u00cdCH HO\u1ea0T T\u1ea2I V\u1ec0' : '\u0110ANG T\u1ea2I V\u1ec0');\n            };\n\n            document.getElementById('copy-content').onclick = () => {\n                const text = document.getElementById('content-display').innerText;\n                const el = document.createElement('textarea');\n                el.value = text;\n                document.body.appendChild(el);\n                el.select();\n                document.execCommand('copy');\n                document.body.removeChild(el);\n                showToast('\u0110\u00c3 CH\u00c9P N\u1ed8I DUNG');\n            };\n        });\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Cloud Content Manager v14 Cloud Manager \u0110ANG K\u1ebeT N\u1ed0I 0 M\u1ee5c D\u1eef li\u1ec7u (N\u1ed9i dung | Link) L\u1ea5y d\u1eef li\u1ec7u ti\u1ebfp theo N\u1ed9i dung hi\u1ec3n <a class=\"mh-excerpt-more\" href=\"https:\/\/tinbamien.com\/?page_id=20\" title=\"lay lan luot 2\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-20","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tinbamien.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":1,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/20\/revisions"}],"predecessor-version":[{"id":21,"href":"https:\/\/tinbamien.com\/index.php?rest_route=\/wp\/v2\/pages\/20\/revisions\/21"}],"wp:attachment":[{"href":"https:\/\/tinbamien.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}