You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
1.8 KiB
JavaScript

/**
* Minified by jsDelivr using Terser v5.7.1.
* Original file: /npm/docsify-progress@1.0.3/dist/progress.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
function plugin(o,e){let t;o.mounted((function(){const o=document.getElementsByClassName("content")[0];t=parseFloat(window.getComputedStyle(o).paddingTop.replace("px",""));let e=`\n <div style="position: fixed; width: 100%; z-index: 999; height: ${window.$docsify.progress.height};\n ${"top"===window.$docsify.progress.position?"top: 0;":"bottom: 0;"}">\n <div id="progress-display" style="background-color: ${window.$docsify.progress.color}; width: 0; border-radius: 2px; height: ${window.$docsify.progress.height}; transition: width 0.3s;"></div>\n </div>\n `;const n=document.getElementsByTagName("body")[0];n.innerHTML=n.innerHTML+e;document.querySelector("div.sidebar-toggle-button").addEventListener("click",(function(o){o.stopPropagation(),function(){const o=document.getElementsByTagName("body")[0];o.classList.contains("close")?o.classList.remove("close"):o.classList.add("close")}()}))})),o.ready((function(){window.addEventListener("scroll",(function(o){let e=t+parseFloat(window.getComputedStyle(document.getElementById("main")).height.replace("px","")),n=document.body.scrollTop+document.documentElement.scrollTop,i=e-document.body.offsetHeight;document.getElementById("progress-display").style.width=Math.ceil(n/i*100)+"%"}))}))}window.$docsify.progress=Object.assign({position:"top",color:"var(--theme-color,#42b983)",height:"3px"},window.$docsify.progress),window.$docsify.plugins=[].concat(plugin,window.$docsify.plugins);
//# sourceMappingURL=/sm/751d64f4b5f0684c3d90329d52ec68d82ee2d95f859eb9ffc311aed273874276.map