[Không có tiêu đề]
Table of Contents
Để lấy một phần tử, bạn có thể dùng hàm document.getElementById('id').
Hãy nhấn tổ hợp phím Ctrl + C để sao chép.
<style>
.ex-wrap {
max-width: 960px;
margin: 2rem auto;
padding: 0 1rem
}
.ex-card {
background: var(--contentB);
border: 1px solid var(--contentL);
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
color: var(--bodyC);
font-family: var(--fontB);
}
.ex-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 18px;
border-bottom: 1px solid var(--contentL)
}
.ex-title {
font-weight: 700;
font-size: 1.1rem;
display: flex;
align-items: center;
gap: 8px;
color: var(--headC)
}
.ex-actions {
display: flex;
gap: 8px
}
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border-radius: 8px;
border: 1px solid var(--contentL);
background: var(--contentBa, transparent);
color: var(--bodyC);
cursor: pointer;
font-weight: 600;
transition: .2s
}
.btn:hover {
background: var(--transB)
}
.btn.primary {
background: var(--linkB);
border-color: var(--linkB);
color: #fff;
}
.btn.primary:hover {
filter: brightness(1.1)
}
.btn .ic {
width: 15px;
height: 15px;
flex-shrink: 0
}
.ex-body {
padding: 18px 20px
}
.ex-input {
display: flex;
gap: 8px
}
.ex-input input {
flex: 1;
border: 1px solid var(--contentL);
border-radius: 8px;
padding: 10px 12px;
background: var(--contentBa);
color: var(--bodyC);
font: 600 14px/1.2 var(--fontB);
}
.ex-meta {
margin-top: 10px;
display: flex;
gap: 10px;
flex-wrap: wrap
}
.chip {
border: 1px dashed var(--contentL);
border-radius: 999px;
padding: 5px 10px;
font-size: 12px;
color: var(--bodyCa);
}
.ex-divider {
height: 1px;
background: var(--contentL);
margin: 16px -20px
}
.ex-tabs {
display: flex;
gap: 6px;
margin-bottom: 10px
}
.tab {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
color: var(--bodyC)
}
.tab.active {
background: var(--transB);
color: var(--bodyC)
}
.panel {
display: none
}
.panel.show {
display: block
}
.rendered {
border: 1px solid var(--contentL);
border-radius: 10px;
padding: 16px;
background: var(--contentBa);
overflow: auto;
color: var(--bodyC);
}
.ex-toolbar {
display: flex;
justify-content: flex-end;
margin-top: 10px
}
.skeleton {
display: grid;
gap: 10px
}
.skl {
height: 12px;
border-radius: 6px;
background: linear-gradient(90deg, transparent, var(--contentL), transparent);
background-size: 200% 100%;
animation: shine 1.3s infinite
}
.skl.big {
height: 160px;
border-radius: 10px
}
@keyframes shine {
to {
background-position: -200% 0
}
}
@media (max-width: 768px) {
.ex-wrap {
padding: 0 .75rem
}
.ex-head {
padding: 12px 14px
}
.ex-title {
font-size: 1rem
}
.ex-body {
padding: 14px 16px
}
.btn {
padding: 8px 12px
}
.ex-tabs {
flex-wrap: wrap;
gap: 8px
}
.tab {
padding: 8px 10px
}
.rendered {
padding: 14px;
max-height: 55vh;
-webkit-overflow-scrolling: touch;
}
}
@media (max-width: 480px) {
.ex-card {
border-radius: 10px
}
.ex-head {
flex-direction: column;
align-items: stretch;
gap: 10px;
}
.ex-actions {
width: 100%;
gap: 6px;
}
.ex-actions .btn {
flex: 1 1 auto;
padding: 10px 12px;
}
.ex-input {
flex-direction: column;
gap: 10px;
}
.ex-input input {
font-size: 16px;
padding: 12px 12px;
}
.ex-input .btn {
width: 100%;
justify-content: center;
}
.ex-meta {
gap: 6px;
}
.chip {
padding: 4px 10px;
font-size: 11px;
}
.ex-divider {
margin: 14px -16px
}
.ex-tabs {
margin-bottom: 8px;
gap: 6px;
}
.tab {
flex: 1 1 calc(50% - 6px);
text-align: center;
}
.panel.show {
margin-top: 6px
}
.rendered {
padding: 12px;
font-size: 13px;
line-height: 1.4;
max-height: 60vh;
overflow: auto;
word-break: break-word;
}
.ex-toolbar {
justify-content: stretch;
gap: 8px;
}
.ex-toolbar .btn {
flex: 1 1 auto;
}
}
</style>
<div class="ex-wrap">
<div class="ex-card" id="extractor">
<div class="ex-head">
<div class="ex-title">
<svg class="ic" viewBox="0 0 24 24" fill="currentColor">
<path d="M4 5h16v2H4zM4 11h16v2H4zM4 17h10v2H4z" />
</svg>
Blogger Post Extractor
</div>
<div class="ex-actions">
<button class="btn" id="openBtn" disabled>
<svg class="ic" viewBox="0 0 24 24" fill="currentColor">
<path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3z" />
<path d="M5 5h7v2H7v10h10v-5h2v7H5V5z" />
</svg>Open
</button>
<button class="btn" id="copyBtn" disabled>
<svg class="ic" viewBox="0 0 24 24" fill="currentColor">
<path
d="M16 1H4a2 2 0 0 0-2 2v12h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z" />
</svg>Copy
</button>
<button class="btn" id="downloadBtn" disabled> <svg class="ic" viewBox="0 0 24 24" fill="currentColor">
<path
d="M5 20h14a1 1 0 0 0 1-1v-2h-2v1H6v-1H4v2a1 1 0 0 0 1 1zm7-17a1 1 0 0 0-1 1v8.59l-2.3-2.3-1.4 1.42L12 16.42l4.7-4.71-1.4-1.42-2.3 2.3V4a1 1 0 0 0-1-1z" />
</svg> Download </button>
</div>
</div>
<div class="ex-body">
<div class="ex-input">
<input type="url" id="postUrl"
placeholder="https://www.truongdevs.com/2025/10/tplus-ui-template-blogger-premium.html">
<button class="btn primary" id="extractBtn"> <svg class='line' viewBox='0 0 24 24'>
<path
d='M6.89001 9C7.87001 9.49 8.71001 10.23 9.32001 11.15C9.67001 11.67 9.67001 12.34 9.32001 12.86C8.71001 13.77 7.87001 14.51 6.89001 15'>
</path>
<path d='M13 15H17'></path>
<path d='M9 22H15C20 22 22 20 22 15V9C22 4 20 2 15 2H9C4 2 2 4 2 9V15C2 20 4 22 9 22Z'></path>
</svg> Extract </button>
</div>
<div id="loading" style="display:none;margin-top:12px">
<div class="skeleton">
<div class="skl" style="width:45%"></div>
<div class="skl big"></div>
</div>
</div>
<div id="meta" class="ex-meta" style="display:none">
<div class="chip" id="metaBlog"></div>
<div class="chip" id="metaDate"></div>
<div class="chip" id="metaAuthor"></div>
</div>
<div class="ex-divider"></div>
<div class="ex-tabs">
<div class="tab active" data-tab="rendered">Rendered</div>
<div class="tab" data-tab="source">Source</div>
</div>
<div class="panel show" id="panel-rendered">
<div class="rendered" id="preview">The result will be displayed here...</div>
</div>
<div class="panel" id="panel-source">
<pre><code class="language-html"></code></pre>
</div>
<div class="ex-toolbar">
<small class="ex-hint" id="detector"></small>
</div>
</div>
</div>
</div>
<div class="toast" id="toast"></div>
<script>
const _0x3acdd1=_0xbe68;(function(_0x449370,_0x200dad){const _0x594d35=_0xbe68,_0x2e6a1c=_0x449370();while(!![]){try{const _0x55b8ec=-parseInt(_0x594d35(0x181))/0x1+-parseInt(_0x594d35(0x191))/0x2*(-parseInt(_0x594d35(0x1af))/0x3)+parseInt(_0x594d35(0x1c8))/0x4+-parseInt(_0x594d35(0x1d7))/0x5*(-parseInt(_0x594d35(0x1b1))/0x6)+parseInt(_0x594d35(0x1e2))/0x7*(parseInt(_0x594d35(0x19a))/0x8)+parseInt(_0x594d35(0x16d))/0x9*(parseInt(_0x594d35(0x193))/0xa)+-parseInt(_0x594d35(0x1ec))/0xb;if(_0x55b8ec===_0x200dad)break;else _0x2e6a1c['push'](_0x2e6a1c['shift']());}catch(_0x485120){_0x2e6a1c['push'](_0x2e6a1c['shift']());}}}(_0x2415,0xd062b));const API_KEY=_0x3acdd1(0x17b),$=_0x3aef8b=>document[_0x3acdd1(0x19f)](_0x3aef8b),$$=_0x49e064=>document[_0x3acdd1(0x168)](_0x49e064),show=(_0x1464a8,_0x1df8ea=!![])=>_0x1464a8&&(_0x1464a8[_0x3acdd1(0x1b6)]['display']=_0x1df8ea?'':'none');let __lastHTML='',__lastTitle='';function normalizePostUrl(_0x3e517f){const _0x405db5=_0x3acdd1,_0x299fb5=new URL(_0x3e517f);_0x299fb5[_0x405db5(0x19c)][_0x405db5(0x1cc)]('m');if(_0x299fb5[_0x405db5(0x17f)][_0x405db5(0x1a7)]('/')&&_0x299fb5[_0x405db5(0x17f)]!=='/')_0x299fb5[_0x405db5(0x17f)]=_0x299fb5['pathname'][_0x405db5(0x170)](0x0,-0x1);return _0x299fb5[_0x405db5(0x1a0)]();}async function getJson(_0x46acee){const _0xdf03e=_0x3acdd1,_0x58a865=await fetch(_0x46acee),_0x2308ad=await _0x58a865['text']();if(!_0x58a865['ok'])throw new Error(_0xdf03e(0x1e5)+_0x58a865[_0xdf03e(0x18a)]+'\x20'+_0x58a865[_0xdf03e(0x1ab)]+_0xdf03e(0x195)+(_0x2308ad||_0xdf03e(0x1be)));try{return JSON[_0xdf03e(0x1e7)](_0x2308ad);}catch{throw new Error(_0xdf03e(0x1ac)+_0x2308ad);}}function _0xbe68(_0xecb810,_0xaec1ba){const _0x2415e0=_0x2415();return _0xbe68=function(_0xbe683a,_0x25e865){_0xbe683a=_0xbe683a-0x166;let _0x2a0d89=_0x2415e0[_0xbe683a];return _0x2a0d89;},_0xbe68(_0xecb810,_0xaec1ba);}async function ensureHLJS(){const _0x22e9d1=_0x3acdd1;if(window[_0x22e9d1(0x1ef)]?.[_0x22e9d1(0x1e0)])return!![];await new Promise((_0x245230,_0x530003)=>{const _0x1322dc=_0x22e9d1;if(document[_0x1322dc(0x19f)](_0x1322dc(0x1c0)))return _0x245230();const _0x8e50dc=document[_0x1322dc(0x17e)](_0x1322dc(0x1b3));_0x8e50dc[_0x1322dc(0x1de)]=_0x1322dc(0x1e8),_0x8e50dc[_0x1322dc(0x199)]=!![],_0x8e50dc[_0x1322dc(0x1a3)]=_0x245230,_0x8e50dc[_0x1322dc(0x1c1)]=_0x530003,_0x8e50dc[_0x1322dc(0x1bd)](_0x1322dc(0x174),'1'),document[_0x1322dc(0x177)]['appendChild'](_0x8e50dc);})['catch'](()=>{});if(window[_0x22e9d1(0x1ef)])try{hljs[_0x22e9d1(0x184)]({'ignoreUnescapedHTML':!![],'classPrefix':_0x22e9d1(0x179)}),document['querySelectorAll'](_0x22e9d1(0x1d5))['forEach'](_0x2068d5=>hljs['highlightElement'](_0x2068d5));}catch(_0xa21c61){console['error'](_0xa21c61);}return!!window[_0x22e9d1(0x1ef)]?.[_0x22e9d1(0x1e0)];}function getPreEl(){const _0x2d0bd6=_0x3acdd1;return $(_0x2d0bd6(0x1ba));}function _0x2415(){const _0xecdb7d=['.panel','#panel-source\x20pre','info','className','setAttribute','No\x20error\x20body','</strong>','script[data-hljs-core]','onerror','HTML\x20has\x20been\x20copied.','#openBtn','Input\x20Required','#metaDate','\x0a\x20\x20\x20\x20\x20\x20\x20\x20','Don\x27t\x20have\x20any\x20content.','759564yntZDx','success','body','show','delete','data-result-language','add','The\x20content\x20has\x20been\x20loaded\x20successfully.','.tab','value','addEventListener','replace','#loading','pre\x20code','classList','400QYyYUJ','<span>','trim','#preview','active','remove','#extractBtn','src','warn','highlightElement','split','35sFMHVe','</span>','Copied','HTTP\x20','click','parse','https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js','&publishedMax=','find','length','23230372MWpRSL','textContent','\x0a\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x229\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22/>\x0a\x20\x20\x20\x20<path\x20d=\x22M8.5\x2012.5l2.5\x202.5\x204.5-5\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20</svg>','hljs','https://www.googleapis.com/blogger/v3/blogs/byurl?url=','&maxResults=100&key=','error','message','writeText','innerHTML','source','\x0a\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20<path\x20d=\x22M12\x204l9\x2016H3l9-16z\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20<path\x20d=\x22M12\x2010v4m0\x203h.01\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20</svg>','querySelectorAll','_blank','data-ex-toast','\x0a\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x229\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22/>\x0a\x20\x20\x20\x20<path\x20d=\x22M9\x209l6\x206M15\x209l-6\x206\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20</svg>','post','27erruwn','\x0a\x20\x20.ex-toast{\x0a\x20\x20\x20\x20position:fixed;\x20top:128px;\x20right:48px;\x20z-index:9999;\x0a\x20\x20\x20\x20min-width:300px;\x20max-width:420px;\x20border-radius:12px;\x0a\x20\x20\x20\x20background:#2b2b2b;\x20color:#fff;\x20box-shadow:0\x2012px\x2032px\x20rgba(0,0,0,.32);\x0a\x20\x20\x20\x20padding:14px\x2016px;\x20opacity:0;\x20transform:translateY(-8px);\x20pointer-events:none;\x0a\x20\x20\x20\x20transition:opacity\x20.24s\x20cubic-bezier(.2,.8,.2,1),\x20transform\x20.24s\x20cubic-bezier(.2,.8,.2,1);\x0a\x20\x20\x20\x20font-family:var(--fontB,system-ui);\x20border:1px\x20solid\x20rgba(255,255,255,.08);\x0a\x20\x20}\x0a\x20\x20.ex-toast.show{opacity:1;\x20transform:translateY(0);\x20pointer-events:auto}\x0a\x20\x20.ex-toast.success{background:#1f5f2a;\x20border-color:#2e7d32}\x0a\x20\x20.ex-toast.error{background:#6b1f1f;\x20border-color:#d32f2f}\x0a\x20\x20.ex-toast.info{background:#123552;\x20border-color:#1976d2}\x0a\x20\x20.ex-toast.warn{background:#5c4216;\x20border-color:#f9a825}\x0a\x20\x20.ex-toast\x20.row{display:flex;\x20gap:12px;\x20align-items:flex-start}\x0a\x20\x20.ex-toast\x20.ico{width:22px;\x20height:22px;\x20flex:0\x200\x2022px;\x20margin-top:2px;\x20color:#fff}\x0a\x20\x20.ex-toast\x20.ico\x20svg{display:block;\x20width:100%;\x20height:100%}\x0a\x20\x20.ex-toast\x20.txt{flex:1;\x20min-width:0}\x0a\x20\x20.ex-toast\x20strong{display:block;\x20font-weight:700;\x20font-size:15px;\x20line-height:1.2}\x0a\x20\x20.ex-toast\x20span{display:block;\x20font-size:13px;\x20opacity:.95;\x20margin-top:2px}\x0a\x20\x20.ex-toast\x20.close{margin-left:8px;\x20flex:0\x200\x2028px;\x20width:28px;\x20height:28px;\x20display:inline-flex;\x20align-items:center;\x20justify-content:center;\x20border:0;\x20background:transparent;\x20color:#fff;\x20opacity:.9;\x20cursor:pointer;\x20border-radius:6px}\x0a\x20\x20.ex-toast\x20.close:hover{background:rgba(255,255,255,.12)}\x0a\x20\x20.ex-toast\x20.close\x20svg{width:16px;\x20height:16px;\x20fill:currentColor}\x0a\x20\x20@media\x20(max-width:768px){\x0a\x20\x20\x20\x20.ex-toast{left:50%;\x20right:auto;\x20top:auto;\x20bottom:calc(16px\x20+\x20env(safe-area-inset-bottom));\x20transform:translate(-50%,8px);\x20width:min(92vw,460px)}\x0a\x20\x20\x20\x20.ex-toast.show{transform:translate(-50%,0)}\x0a\x20\x20}','No\x20content','slice','#panel-','catch','padStart','data-hljs-core','code','origin','head','ex-toast\x20','hl-','Error\x20extracting\x20post.','AIzaSyC4O-VH0dUVe_y30dVSYehCunft6KNl4XQ','map','By\x20','createElement','pathname','#meta','663729xutBeb','text/html;charset=utf-8','#metaBlog','configure','<code\x20class=\x22language-xml\x22></code>','Extract\x20Failed','#copyBtn','</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22txt\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','.tab[data-tab=\x22rendered\x22]','status','Unknown','Don\x27t\x20find\x20any\x20posts\x20in\x20the\x20specified\x20month.','published','div','download','open','22622ftgDjj','style[data-ex-toast]','5142050wMupMP','appendChild','\x20—\x20','<strong>','content','num','defer','940024QECzxU','disabled','searchParams','#postUrl','#downloadBtn','querySelector','toString','Please\x20enter\x20a\x20Blogger\x20post\x20URL.','forEach','onload','createObjectURL','dataset','url','endsWith','tab','then','from','statusText','Invalid\x20JSON\x20—\x20','Please\x20extract\x20first.','clipboard','231GNtrzL','<i></i>','32862HyrTcH','.close','script','h1,\x20.post-title,\x20.entry-title','&key=','style','Don\x27t\x20find\x20the\x20post\x20with\x20the\x20given\x20URL.','/posts?publishedMin='];_0x2415=function(){return _0xecdb7d;};return _0x2415();}function buildSourceWithLineNumbers(_0xfce375){const _0x475946=_0x3acdd1,_0x1acb31=getPreEl();if(!_0x1acb31)return null;_0x1acb31[_0x475946(0x1f5)]='',_0x1acb31[_0x475946(0x1bd)](_0x475946(0x1cd),'html');const _0x301ebc=document[_0x475946(0x17e)](_0x475946(0x18e));_0x301ebc[_0x475946(0x1bc)]=_0x475946(0x198);const _0x4e4245=_0xfce375[_0x475946(0x1e1)]('\x0a')['length']||0x1;_0x301ebc[_0x475946(0x1f5)]=Array[_0x475946(0x1aa)]({'length':_0x4e4245})[_0x475946(0x17c)](()=>_0x475946(0x1b0))['join']('');const _0x41553c=document[_0x475946(0x17e)](_0x475946(0x175));return _0x41553c[_0x475946(0x1bc)]='language-xml',_0x41553c[_0x475946(0x1ed)]=_0xfce375,_0x1acb31[_0x475946(0x194)](_0x301ebc),_0x1acb31['appendChild'](_0x41553c),_0x41553c;}async function highlightSource(){const _0x5d825d=_0x3acdd1,_0x1d77e0=await ensureHLJS();if(!_0x1d77e0)return;const _0x484810=getPreEl()?.[_0x5d825d(0x19f)](_0x5d825d(0x175));if(_0x484810)try{hljs[_0x5d825d(0x1e0)](_0x484810);}catch(_0xbf1262){}}(function injectToastCSS(){const _0x41564c=_0x3acdd1;if(document[_0x41564c(0x19f)](_0x41564c(0x192)))return;const _0x1e76c6=document[_0x41564c(0x17e)](_0x41564c(0x1b6));_0x1e76c6[_0x41564c(0x1bd)](_0x41564c(0x16a),'1'),_0x1e76c6['textContent']=_0x41564c(0x16e),document[_0x41564c(0x177)][_0x41564c(0x194)](_0x1e76c6);}());const TOAST_ICONS={'success':_0x3acdd1(0x1ee),'error':_0x3acdd1(0x16b),'info':'\x0a\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x229\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22/>\x0a\x20\x20\x20\x20<path\x20d=\x22M12\x208h.01M11\x2011h2v5h-2z\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20</svg>','warn':_0x3acdd1(0x167)};function toast({title:title='',message:message='',type:type=_0x3acdd1(0x1bb),timeout:timeout=0xa28}={}){const _0x5c9a12=_0x3acdd1,_0x3ea7d0=document[_0x5c9a12(0x17e)]('div');_0x3ea7d0[_0x5c9a12(0x1bc)]=_0x5c9a12(0x178)+type,_0x3ea7d0[_0x5c9a12(0x1f5)]='\x0a\x20\x20\x20\x20<div\x20class=\x22row\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22ico\x22>'+(TOAST_ICONS[type]||TOAST_ICONS[_0x5c9a12(0x1bb)])+_0x5c9a12(0x188)+(title?_0x5c9a12(0x196)+title+_0x5c9a12(0x1bf):'')+_0x5c9a12(0x1c6)+(message?_0x5c9a12(0x1d8)+message+_0x5c9a12(0x1e3):'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<button\x20class=\x22close\x22\x20aria-label=\x22Close\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22><path\x20d=\x22M6\x206l12\x2012M18\x206l-12\x2012\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22/></svg>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20</div>',document[_0x5c9a12(0x1ca)][_0x5c9a12(0x194)](_0x3ea7d0),requestAnimationFrame(()=>_0x3ea7d0['classList']['add'](_0x5c9a12(0x1cb)));const _0x1a8b2f=()=>{const _0xfc0cdb=_0x5c9a12;_0x3ea7d0[_0xfc0cdb(0x1d6)][_0xfc0cdb(0x1dc)](_0xfc0cdb(0x1cb)),setTimeout(()=>_0x3ea7d0[_0xfc0cdb(0x1dc)](),0xdc);},_0x327e71=setTimeout(_0x1a8b2f,timeout);return _0x3ea7d0[_0x5c9a12(0x19f)](_0x5c9a12(0x1b2))['addEventListener'](_0x5c9a12(0x1e6),()=>{clearTimeout(_0x327e71),_0x1a8b2f();}),_0x3ea7d0;}function buildWrappedForBlogger(){return __lastHTML;}function doCopyRaw(){const _0x2b7976=_0x3acdd1;if(!__lastHTML)return toast({'type':_0x2b7976(0x1df),'title':'Nothing\x20to\x20copy','message':_0x2b7976(0x1ad)});navigator[_0x2b7976(0x1ae)][_0x2b7976(0x1f4)](buildWrappedForBlogger())[_0x2b7976(0x1a9)](()=>{const _0x4eba9c=_0x2b7976;toast({'type':_0x4eba9c(0x1c9),'title':_0x4eba9c(0x1e4),'message':_0x4eba9c(0x1c2)});})[_0x2b7976(0x172)](()=>{const _0xd44fc0=_0x2b7976;toast({'type':_0xd44fc0(0x1f2),'title':'Copy\x20failed','message':'Browser\x20doesn\x27t\x20support\x20clipboard.'});});}function toSafeFileName(_0x1eb9fe){const _0x46aaa3=_0x3acdd1;if(!_0x1eb9fe)_0x1eb9fe=_0x46aaa3(0x16c);let _0x8c821d=_0x1eb9fe[_0x46aaa3(0x1d9)]()[_0x46aaa3(0x1d3)](/[\u0000-\u001F]/g,'')[_0x46aaa3(0x1d3)](/[\/\\:\*\?"<>\|]/g,'\x20')[_0x46aaa3(0x1d3)](/\s+/g,'_')[_0x46aaa3(0x1d3)](/_+/g,'_')[_0x46aaa3(0x1d3)](/^_+|_+$/g,'');if(!_0x8c821d)_0x8c821d=_0x46aaa3(0x16c);return _0x8c821d+'.html';}function getH1FromHTML(_0x49d59c){const _0x1bb3aa=_0x3acdd1,_0x1d2d8d=document['createElement'](_0x1bb3aa(0x18e));_0x1d2d8d[_0x1bb3aa(0x1f5)]=_0x49d59c;const _0x195fa6=_0x1d2d8d['querySelector'](_0x1bb3aa(0x1b4));return _0x195fa6?_0x195fa6['textContent'][_0x1bb3aa(0x1d9)]():'';}function doDownloadRaw(){const _0x7f18db=_0x3acdd1;if(!__lastHTML)return toast({'type':'warn','title':_0x7f18db(0x16f),'message':_0x7f18db(0x1c7)});const _0x5e119d=getH1FromHTML(__lastHTML),_0x4fde83=toSafeFileName(_0x5e119d||__lastTitle||'post'),_0x5e404b=new Blob([buildWrappedForBlogger()],{'type':_0x7f18db(0x182)}),_0x205c09=document['createElement']('a');_0x205c09['href']=URL[_0x7f18db(0x1a4)](_0x5e404b),_0x205c09[_0x7f18db(0x18f)]=_0x4fde83,_0x205c09[_0x7f18db(0x1e6)]();}$$('.tab')[_0x3acdd1(0x1a2)](_0x220dd4=>{const _0x584b0e=_0x3acdd1;_0x220dd4[_0x584b0e(0x1d2)](_0x584b0e(0x1e6),async()=>{const _0x2b3545=_0x584b0e;$$(_0x2b3545(0x1d0))['forEach'](_0x3f4020=>_0x3f4020[_0x2b3545(0x1d6)][_0x2b3545(0x1dc)]('active')),_0x220dd4[_0x2b3545(0x1d6)][_0x2b3545(0x1ce)](_0x2b3545(0x1db)),$$(_0x2b3545(0x1b9))[_0x2b3545(0x1a2)](_0x1eba42=>_0x1eba42[_0x2b3545(0x1d6)][_0x2b3545(0x1dc)](_0x2b3545(0x1cb)));const _0x11e48d=$(_0x2b3545(0x171)+_0x220dd4[_0x2b3545(0x1a5)][_0x2b3545(0x1a8)]);_0x11e48d&&_0x11e48d['classList']['add'](_0x2b3545(0x1cb));if(_0x220dd4['dataset']['tab']===_0x2b3545(0x166))await highlightSource();});}),$(_0x3acdd1(0x187))['addEventListener'](_0x3acdd1(0x1e6),doCopyRaw),$(_0x3acdd1(0x19e))['addEventListener'](_0x3acdd1(0x1e6),doDownloadRaw),$(_0x3acdd1(0x1c3))[_0x3acdd1(0x1d2)](_0x3acdd1(0x1e6),()=>{const _0xb8ee8e=_0x3acdd1,_0x2b8e2e=$(_0xb8ee8e(0x19d))[_0xb8ee8e(0x1d1)][_0xb8ee8e(0x1d9)]();if(_0x2b8e2e)window[_0xb8ee8e(0x190)](_0x2b8e2e,_0xb8ee8e(0x169));}),$(_0x3acdd1(0x1dd))[_0x3acdd1(0x1d2)](_0x3acdd1(0x1e6),runExtract);async function runExtract(){const _0x12ec68=_0x3acdd1,_0x4e6bde=$('#postUrl')[_0x12ec68(0x1d1)][_0x12ec68(0x1d9)]();if(!_0x4e6bde){toast({'type':_0x12ec68(0x1f2),'title':_0x12ec68(0x1c4),'message':_0x12ec68(0x1a1)});return;}show($(_0x12ec68(0x1d4)),!![]),$(_0x12ec68(0x1da))['innerHTML']='\x20',getPreEl()[_0x12ec68(0x1f5)]=_0x12ec68(0x185),$('#copyBtn')[_0x12ec68(0x19b)]=$(_0x12ec68(0x19e))[_0x12ec68(0x19b)]=$(_0x12ec68(0x1c3))[_0x12ec68(0x19b)]=!![],__lastHTML='',__lastTitle='';try{const _0x2c7b13=normalizePostUrl(_0x4e6bde),_0x3b6f24=new URL(_0x2c7b13),_0x5c5f70=_0x3b6f24[_0x12ec68(0x176)]+'/',_0x1c8e82=await getJson(_0x12ec68(0x1f0)+encodeURIComponent(_0x5c5f70)+_0x12ec68(0x1b5)+API_KEY),_0x36fc3d=_0x1c8e82['id'],[_0x4d0213,_0x50a51d]=_0x3b6f24[_0x12ec68(0x17f)][_0x12ec68(0x1d3)](/^\/+/,'')[_0x12ec68(0x1e1)]('/');if(!_0x4d0213||!_0x50a51d)throw new Error('URL\x20post\x20không\x20hợp\x20lệ');const _0x477df5=+_0x4d0213,_0x27cfba=+_0x50a51d,_0x18da34=_0x4acc6b=>String(_0x4acc6b)[_0x12ec68(0x173)](0x2,'0'),_0x4de10e=new Date(_0x477df5,_0x27cfba,0x0)['getDate'](),_0x37ad39=_0x477df5+'-'+_0x18da34(_0x27cfba)+'-01T00:00:00Z',_0x3e6c28=_0x477df5+'-'+_0x18da34(_0x27cfba)+'-'+_0x18da34(_0x4de10e)+'T23:59:59Z',_0x76e67a=await getJson('https://www.googleapis.com/blogger/v3/blogs/'+_0x36fc3d+_0x12ec68(0x1b8)+_0x37ad39+_0x12ec68(0x1e9)+_0x3e6c28+_0x12ec68(0x1f1)+API_KEY);if(!_0x76e67a['items']?.[_0x12ec68(0x1eb)])throw new Error(_0x12ec68(0x18c));const _0x39c2c6=_0x76e67a['items']['map'](_0x7aa749=>({..._0x7aa749,'_u':normalizePostUrl(_0x7aa749[_0x12ec68(0x1a6)])})),_0x31acc2=_0x39c2c6[_0x12ec68(0x1ea)](_0x2a4d63=>_0x2a4d63['_u']===_0x2c7b13)||_0x39c2c6[_0x12ec68(0x1ea)](_0x5517e4=>{try{return new URL(_0x5517e4['_u'])['pathname']===_0x3b6f24['pathname'];}catch{return![];}});if(!_0x31acc2)throw new Error(_0x12ec68(0x1b7));const _0x113b99=_0x31acc2[_0x12ec68(0x197)]||'',_0x378f5a=_0x31acc2['author']?.['displayName']||_0x12ec68(0x18b),_0x1a062a=_0x31acc2[_0x12ec68(0x18d)]||'';__lastTitle=_0x31acc2['title']||'',$(_0x12ec68(0x183))[_0x12ec68(0x1ed)]=_0x1c8e82['name']||_0x5c5f70,$(_0x12ec68(0x1c5))['textContent']=new Date(_0x1a062a)['toLocaleString'](),$('#metaAuthor')['textContent']=_0x12ec68(0x17d)+_0x378f5a,show($(_0x12ec68(0x180)),!![]),$(_0x12ec68(0x1da))[_0x12ec68(0x1f5)]=_0x113b99,buildSourceWithLineNumbers(_0x113b99),__lastHTML=_0x113b99,document[_0x12ec68(0x19f)](_0x12ec68(0x189))['click'](),$('#copyBtn')[_0x12ec68(0x19b)]=$('#downloadBtn')[_0x12ec68(0x19b)]=$('#openBtn')[_0x12ec68(0x19b)]=![],toast({'type':'success','title':'Post\x20Extracted!','message':_0x12ec68(0x1cf)});}catch(_0x43ce9e){toast({'type':_0x12ec68(0x1f2),'title':_0x12ec68(0x186),'message':_0x43ce9e[_0x12ec68(0x1f3)]||_0x12ec68(0x17a)});}finally{show($('#loading'),![]);}}
</script>
Đăng nhận xét