mirror of
https://github.com/StarGazer114/stargazer114.github.io.git
synced 2025-01-08 14:28:17 +08:00
296 lines
29 KiB
HTML
296 lines
29 KiB
HTML
|
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>数据备份“321”原则 | 拾光小阁</title><meta name="author" content="br"><meta name="copyright" content="br"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="数据备份321原则是指3份备份,2种存储介质,1份异地备份">
|
|||
|
<meta property="og:type" content="article">
|
|||
|
<meta property="og:title" content="数据备份“321”原则">
|
|||
|
<meta property="og:url" content="https://bear556.top/88e16ba1a3a2/index.html">
|
|||
|
<meta property="og:site_name" content="拾光小阁">
|
|||
|
<meta property="og:description" content="数据备份321原则是指3份备份,2种存储介质,1份异地备份">
|
|||
|
<meta property="og:locale" content="zh_CN">
|
|||
|
<meta property="og:image" content="https://t.mwm.moe/fj">
|
|||
|
<meta property="article:published_time" content="2024-10-03T18:11:00.000Z">
|
|||
|
<meta property="article:modified_time" content="2024-12-16T07:07:08.204Z">
|
|||
|
<meta property="article:author" content="br">
|
|||
|
<meta name="twitter:card" content="summary">
|
|||
|
<meta name="twitter:image" content="https://t.mwm.moe/fj"><link rel="shortcut icon" href="/img/favicon.ico"><link rel="canonical" href="https://bear556.top/88e16ba1a3a2/index.html"><link rel="preconnect"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="/pluginsSrc/@fortawesome/fontawesome-free/css/all.min.css"><script>
|
|||
|
(() => {
|
|||
|
|
|||
|
const saveToLocal = {
|
|||
|
set: (key, value, ttl) => {
|
|||
|
if (!ttl) return
|
|||
|
const expiry = Date.now() + ttl * 86400000
|
|||
|
localStorage.setItem(key, JSON.stringify({ value, expiry }))
|
|||
|
},
|
|||
|
get: key => {
|
|||
|
const itemStr = localStorage.getItem(key)
|
|||
|
if (!itemStr) return undefined
|
|||
|
const { value, expiry } = JSON.parse(itemStr)
|
|||
|
if (Date.now() > expiry) {
|
|||
|
localStorage.removeItem(key)
|
|||
|
return undefined
|
|||
|
}
|
|||
|
return value
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
window.btf = {
|
|||
|
saveToLocal,
|
|||
|
getScript: (url, attr = {}) => new Promise((resolve, reject) => {
|
|||
|
const script = document.createElement('script')
|
|||
|
script.src = url
|
|||
|
script.async = true
|
|||
|
Object.entries(attr).forEach(([key, val]) => script.setAttribute(key, val))
|
|||
|
script.onload = script.onreadystatechange = () => {
|
|||
|
if (!script.readyState || /loaded|complete/.test(script.readyState)) resolve()
|
|||
|
}
|
|||
|
script.onerror = reject
|
|||
|
document.head.appendChild(script)
|
|||
|
}),
|
|||
|
getCSS: (url, id) => new Promise((resolve, reject) => {
|
|||
|
const link = document.createElement('link')
|
|||
|
link.rel = 'stylesheet'
|
|||
|
link.href = url
|
|||
|
if (id) link.id = id
|
|||
|
link.onload = link.onreadystatechange = () => {
|
|||
|
if (!link.readyState || /loaded|complete/.test(link.readyState)) resolve()
|
|||
|
}
|
|||
|
link.onerror = reject
|
|||
|
document.head.appendChild(link)
|
|||
|
}),
|
|||
|
addGlobalFn: (key, fn, name = false, parent = window) => {
|
|||
|
if (!true && key.startsWith('pjax')) return
|
|||
|
const globalFn = parent.globalFn || {}
|
|||
|
globalFn[key] = globalFn[key] || {}
|
|||
|
globalFn[key][name || Object.keys(globalFn[key]).length] = fn
|
|||
|
parent.globalFn = globalFn
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
const activateDarkMode = () => {
|
|||
|
document.documentElement.setAttribute('data-theme', 'dark')
|
|||
|
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
|||
|
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
|
|||
|
}
|
|||
|
}
|
|||
|
const activateLightMode = () => {
|
|||
|
document.documentElement.setAttribute('data-theme', 'light')
|
|||
|
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
|||
|
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
btf.activateDarkMode = activateDarkMode
|
|||
|
btf.activateLightMode = activateLightMode
|
|||
|
|
|||
|
const theme = saveToLocal.get('theme')
|
|||
|
|
|||
|
theme === 'dark' ? activateDarkMode() : theme === 'light' ? activateLightMode() : null
|
|||
|
|
|||
|
|
|||
|
const asideStatus = saveToLocal.get('aside-status')
|
|||
|
if (asideStatus !== undefined) {
|
|||
|
document.documentElement.classList.toggle('hide-aside', asideStatus === 'hide')
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
const detectApple = () => {
|
|||
|
if (/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)) {
|
|||
|
document.documentElement.classList.add('apple')
|
|||
|
}
|
|||
|
}
|
|||
|
detectApple()
|
|||
|
|
|||
|
})()
|
|||
|
</script><script>const GLOBAL_CONFIG = {
|
|||
|
root: '/',
|
|||
|
algolia: undefined,
|
|||
|
localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":true,"languages":{"hits_empty":"未找到符合您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
|
|||
|
translate: undefined,
|
|||
|
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false,"highlightFullpage":false,"highlightMacStyle":false},
|
|||
|
copy: {
|
|||
|
success: '复制成功',
|
|||
|
error: '复制失败',
|
|||
|
noSupport: '浏览器不支持'
|
|||
|
},
|
|||
|
relativeDate: {
|
|||
|
homepage: false,
|
|||
|
post: false
|
|||
|
},
|
|||
|
runtime: '',
|
|||
|
dateSuffix: {
|
|||
|
just: '刚刚',
|
|||
|
min: '分钟前',
|
|||
|
hour: '小时前',
|
|||
|
day: '天前',
|
|||
|
month: '个月前'
|
|||
|
},
|
|||
|
copyright: undefined,
|
|||
|
lightbox: 'null',
|
|||
|
Snackbar: undefined,
|
|||
|
infinitegrid: {
|
|||
|
js: '/pluginsSrc/@egjs/infinitegrid/dist/infinitegrid.min.js',
|
|||
|
buttonText: '加载更多'
|
|||
|
},
|
|||
|
isPhotoFigcaption: false,
|
|||
|
islazyload: false,
|
|||
|
isAnchor: false,
|
|||
|
percent: {
|
|||
|
toc: true,
|
|||
|
rightside: false,
|
|||
|
},
|
|||
|
autoDarkmode: false
|
|||
|
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
|
|||
|
title: '数据备份“321”原则',
|
|||
|
isPost: true,
|
|||
|
isHome: false,
|
|||
|
isHighlightShrink: false,
|
|||
|
isToc: true,
|
|||
|
isShuoshuo: false
|
|||
|
}</script><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=LXGW+WenKai+TC:wght@700&display=swap" rel="stylesheet"><meta name="generator" content="Hexo 7.3.0"><link rel="alternate" href="/rss.xml" title="拾光小阁" type="application/rss+xml">
|
|||
|
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
|
|||
|
const $loadingBox = document.getElementById('loading-box')
|
|||
|
const $body = document.body
|
|||
|
const preloader = {
|
|||
|
endLoading: () => {
|
|||
|
$body.style.overflow = ''
|
|||
|
$loadingBox.classList.add('loaded')
|
|||
|
},
|
|||
|
initLoading: () => {
|
|||
|
$body.style.overflow = 'hidden'
|
|||
|
$loadingBox.classList.remove('loaded')
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
preloader.initLoading()
|
|||
|
window.addEventListener('load', preloader.endLoading)
|
|||
|
|
|||
|
if (true) {
|
|||
|
btf.addGlobalFn('pjaxSend', preloader.initLoading, 'preloader_init')
|
|||
|
btf.addGlobalFn('pjaxComplete', preloader.endLoading, 'preloader_end')
|
|||
|
}
|
|||
|
})()</script><div id="web_bg" style="background-image: url(https://cn-sy1.rains3.com/static-1/img/DFeeiOJQRFYUUFbBQM.webp);"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img text-center"><img src="/img/avatar.webp" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data text-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/talks/"><i class="fa-fw fas fa-comment"></i><span> 叨叨</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><span class="site-page group"><i class="fa-fw fas fa-list"></i><span> 镜像</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="https://bear556.top"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://gh.bear556.top"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.bear556.top"><span> Netlify</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://vc.bear556.top"><span> Vercel</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://www.travellings.cn/go.html"><i class="fa-fw fas fa-subway"></i><span> 开往</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url(https://t.mwm.moe/fj);"><nav id="nav"><span id="blog-info"><a class="nav-site-title" href="/"><span class="site-name">拾光小阁</span></a><a class="nav-page-title" href="/"><span class="site-name">数据备份“321”原则</span></a></span><div id="menus"><div id="search-button"><span class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></span></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/talks/"><i class="fa-fw fas fa-comment"></i><span> 叨叨</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><span class="site-page group"><i class="fa-fw fas fa-list"></i><span> 镜像</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="https://bear556.top"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://gh.bear556.top"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.bear556.top"><span> Netlify</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href
|
|||
|
<span id="more"></span>
|
|||
|
|
|||
|
<h2 id="3份备份"><a href="#3份备份" class="headerlink" title="3份备份"></a>3份备份</h2><p>我们需要至少备份三个副本,这样即使其中的一个出现了问题,我们也能够有其他的备份来恢复数据,如果数据故障是独立事件,那么三份数据同时故障的几率将是百万分之一。</p>
|
|||
|
<h2 id="2种存储介质"><a href="#2种存储介质" class="headerlink" title="2种存储介质"></a>2种存储介质</h2><p>用2种不同媒介保存可确保不会因为使用同一装置存储数据而引起相同的故障。<br>由于同一存储方案的不同硬盘有可能连续发生故障,建议将数据存于至少2种存储媒介,而且媒介需要位于不同地方。</p>
|
|||
|
<h2 id="1份异地备份"><a href="#1份异地备份" class="headerlink" title="1份异地备份"></a>1份异地备份</h2><p>由于火灾、洪水等意外即可毁坏区域内所有备份,建议将数据存储至不同的区域,比如云端。</p>
|
|||
|
<hr>
|
|||
|
<p>数据无价,希望大家保存好自己的数据。</p>
|
|||
|
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://bear556.top">br</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://bear556.top/88e16ba1a3a2/">https://bear556.top/88e16ba1a3a2/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来源 <a href="https://bear556.top" target="_blank">拾光小阁</a>!</span></div></div><div class="tag_share"><div class="post-share"><div class="social-share" data-image="https://t.mwm.moe/fj" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="/pluginsSrc/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="/pluginsSrc/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><a class="pagination-related" href="/1bab28b2bfe2/" title="ASF挂卡食用教程"><img class="cover" src="https://cn-sy1.rains3.com/img-bed/2024/12/22/676783ac5efe3.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="info"><div class="info-1"><div class="info-item-1">上一篇</div><div class="info-item-2">ASF挂卡食用教程</div></div><div class="info-2"><div class="info-item-1">ASF是一款steam挂卡软件,它可以自动帮我们挂机游戏开获取卡牌。提示:挂卡的原理是模拟游戏在线来掉落卡牌,所以会增加对应的游戏时长,如果你有赛博洁癖,请不要使用此软件! 可以到官方的GitHub仓库来下载最新版本GitHub 创建配置文件下载好之后,双击ArchiSteamFarm.exe后发现并不能开始挂卡,提示需要配置文件前往这个网站来生成一个配置文件Name,SteamLogin,SteamPassword分别填写你的机器人名字(可以自定义)你的steam用户名和密码,SteamParentalCode填你的家庭监护pin码(没有留空)然后点击下载,将下载到的文件放入asf目录下的congig文件夹,再次运行程序,即可开始挂卡 </div></div></div></a><a class="pagination-related" href="/3b5544763853/" title="自建kms服务器激活Windows和office"><img class="cover" src="https://t.mwm.moe/fj" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="info text-right"><div class="info-1"><div class="info-item-1">下一篇</div><div class="info-item-2">自建kms服务器激活Windows和office</div></div><div class="info-2"><div class="info-item-1">项目地址:https://github.com/dylanbai8/kmspro需要开放1688端口。激活方式:powershell输入slmgr /skms <kms服务器地址> && slmgr /ato你也可以使用我搭建的kms服务器slmgr /skms kms.bear556.top && slmgr /ato 1234567891011121314151617181920212223242526# 一键安装KMS服务 (Debian/Ubuntu/Mint 等)$ wget -N --no-check-certificate git.io/k.sh && chmod +x k.sh && bash k.sh debian# 一键安装KMS服务 (CentOS/Redhat/Fedora 等)(如果系统开启了防火墙 须自行开放 1688 端口)$ wget -N --no-check-certificate git.io/k.sh && chmod +x k.sh...</div></div></div></a></nav><hr class="custom-hr"/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="waline-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info text-center"><div class="avatar-img"><img src="/img/a
|
|||
|
let initFn = window.walineFn || null
|
|||
|
const isShuoshuo = GLOBAL_CONFIG_SITE.isShuoshuo
|
|||
|
const option = null
|
|||
|
|
|||
|
const destroyWaline = ele => ele.destroy()
|
|||
|
|
|||
|
const initWaline = (Fn, el = document, path = window.location.pathname) => {
|
|||
|
const waline = Fn({
|
|||
|
el: el.querySelector('#waline-wrap'),
|
|||
|
serverURL: 'https://waline.bear556.top',
|
|||
|
pageview: true,
|
|||
|
dark: 'html[data-theme="dark"]',
|
|||
|
comment: false,
|
|||
|
...option,
|
|||
|
path: isShuoshuo ? path : (option && option.path) || path
|
|||
|
})
|
|||
|
|
|||
|
if (isShuoshuo) {
|
|||
|
window.shuoshuoComment.destroyWaline = () => {
|
|||
|
destroyWaline(waline)
|
|||
|
if (el.children.length) {
|
|||
|
el.innerHTML = ''
|
|||
|
el.classList.add('no-comment')
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
const loadWaline = (el, path) => {
|
|||
|
if (initFn) initWaline(initFn, el, path)
|
|||
|
else {
|
|||
|
btf.getCSS('/pluginsSrc/@waline/client/dist/waline.css')
|
|||
|
.then(() => import('/pluginsSrc/@waline/client/dist/waline.js'))
|
|||
|
.then(({ init }) => {
|
|||
|
initFn = init || Waline.init
|
|||
|
initWaline(initFn, el, path)
|
|||
|
window.walineFn = initFn
|
|||
|
})
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if (isShuoshuo) {
|
|||
|
'Waline' === 'Waline'
|
|||
|
? window.shuoshuoComment = { loadComment: loadWaline }
|
|||
|
: window.loadOtherComment = loadWaline
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
if ('Waline' === 'Waline' || !false) {
|
|||
|
if (false) btf.loadComment(document.getElementById('waline-wrap'),loadWaline)
|
|||
|
else setTimeout(loadWaline, 0)
|
|||
|
} else {
|
|||
|
window.loadOtherComment = loadWaline
|
|||
|
}
|
|||
|
})()</script></div><div class="aplayer no-destroy" data-id="9401784769" data-server="tencent" data-type="playlist" data-fixed="true" data-autoplay="true"> </div><script defer="defer" id="fluttering_ribbon" mobile="false" src="/pluginsSrc/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><link rel="stylesheet" href="/pluginsSrc/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="/pluginsSrc/aplayer/dist/APlayer.min.js"></script><script src="/pluginsSrc/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script>(() => {
|
|||
|
const destroyAplayer = () => {
|
|||
|
if (window.aplayers) {
|
|||
|
for (let i = 0; i < window.aplayers.length; i++) {
|
|||
|
if (!window.aplayers[i].options.fixed) {
|
|||
|
window.aplayers[i].destroy()
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
const runMetingJS = () => {
|
|||
|
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
|
|||
|
}
|
|||
|
|
|||
|
btf.addGlobalFn('pjaxSend', destroyAplayer, 'destroyAplayer')
|
|||
|
btf.addGlobalFn('pjaxComplete', loadMeting, 'runMetingJS')
|
|||
|
})()</script><script src="/pluginsSrc/pjax/pjax.min.js"></script><script>(() => {
|
|||
|
const pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]
|
|||
|
|
|||
|
window.pjax = new Pjax({
|
|||
|
elements: 'a:not([target="_blank"])',
|
|||
|
selectors: pjaxSelectors,
|
|||
|
cacheBust: false,
|
|||
|
analytics: false,
|
|||
|
scrollRestoration: false
|
|||
|
})
|
|||
|
|
|||
|
const triggerPjaxFn = (val) => {
|
|||
|
if (!val) return
|
|||
|
Object.values(val).forEach(fn => fn())
|
|||
|
}
|
|||
|
|
|||
|
document.addEventListener('pjax:send', () => {
|
|||
|
// removeEventListener
|
|||
|
btf.removeGlobalFnEvent('pjaxSendOnce')
|
|||
|
btf.removeGlobalFnEvent('themeChange')
|
|||
|
|
|||
|
// reset readmode
|
|||
|
const $bodyClassList = document.body.classList
|
|||
|
if ($bodyClassList.contains('read-mode')) $bodyClassList.remove('read-mode')
|
|||
|
|
|||
|
triggerPjaxFn(window.globalFn.pjaxSend)
|
|||
|
})
|
|||
|
|
|||
|
document.addEventListener('pjax:complete', () => {
|
|||
|
btf.removeGlobalFnEvent('pjaxCompleteOnce')
|
|||
|
document.querySelectorAll('script[data-pjax]').forEach(item => {
|
|||
|
const newScript = document.createElement('script')
|
|||
|
const content = item.text || item.textContent || item.innerHTML || ""
|
|||
|
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
|
|||
|
newScript.appendChild(document.createTextNode(content))
|
|||
|
item.parentNode.replaceChild(newScript, item)
|
|||
|
})
|
|||
|
|
|||
|
triggerPjaxFn(window.globalFn.pjaxComplete)
|
|||
|
})
|
|||
|
|
|||
|
document.addEventListener('pjax:error', e => {
|
|||
|
if (e.request.status === 404) {
|
|||
|
pjax.loadUrl('/404.html')
|
|||
|
}
|
|||
|
})
|
|||
|
})()</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="text-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜搜搜~" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div></body></html>
|