diff --git a/static/assets/GmeekTOC.js b/static/assets/GmeekTOC.js index 8e1ce25..da30319 100644 --- a/static/assets/GmeekTOC.js +++ b/static/assets/GmeekTOC.js @@ -32,7 +32,7 @@ document.addEventListener("DOMContentLoaded", function() { var css = '.toc {position:fixed;top:130px;left:50%;transform: translateX(50%) translateX(300px);width:200px;padding-left:30px;}@media (max-width: 1249px) {.toc{position:static;top:auto;left:auto;transform:none;padding:10px;margin-bottom:20px;background-color:var(--color-open-muted);}}'; loadResource('style', {css: css}); - loadResource('script', { src: 'https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.27.4/tocbot.min.js' }, function() { + loadResource('script', { src: 'https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/tocbot/4.27.4/tocbot.min.js' }, function() { tocbot.init({ tocSelector: '.toc', contentSelector: '.markdown-body', @@ -43,7 +43,7 @@ document.addEventListener("DOMContentLoaded", function() { }); }); - loadResource('link', { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.27.4/tocbot.css' }); + loadResource('link', { rel: 'stylesheet', href: 'https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/tocbot/4.27.4/tocbot.css' }); const headings = document.querySelectorAll('.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6'); headings.forEach((heading) => {