[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109380":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":30,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},109380,"pace","CodeByZach\u002Fpace","CodeByZach","Automatically add a progress bar to your site.","https:\u002F\u002Fcodebyzach.github.io\u002Fpace\u002F",null,"JavaScript",15581,1831,358,42,0,1,4,70.69,"MIT License",false,"master",true,[25,26,27,5,28,29],"loading-animation","loading-bar","loading-indicator","pace-js","progress-bar","2026-11-23 16:13:07","2026-11-20 22:49:27","PACE\n====\n[![Latest Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002FCodeByZach\u002Fpace?label=release&sort=semver)](https:\u002F\u002Fgithub.com\u002FCodeByZach\u002Fpace\u002Freleases\u002Flatest) [![jsDelivr hits (npm)](https:\u002F\u002Fimg.shields.io\u002Fjsdelivr\u002Fnpm\u002Fhm\u002Fpace-js?color=%23ff5627)](https:\u002F\u002Fwww.jsdelivr.com\u002Fpackage\u002Fnpm\u002Fpace-js) [![Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FCodeByZach\u002Fpace.svg)](https:\u002F\u002Fgithub.com\u002FCodeByZach\u002Fpace) [![Forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002FCodeByZach\u002Fpace.svg)](https:\u002F\u002Fgithub.com\u002FCodeByZach\u002Fpace\u002Fnetwork\u002Fmembers) [![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FCodeByZach\u002Fpace.svg)](LICENSE)\n\nAn automatic web page progress bar.\n\n### [Demo](https:\u002F\u002Fcodebyzach.github.io\u002Fpace\u002F)\n\nInclude [pace.js](https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fpace-js@1\u002Fpace.min.js) and the\n[theme](https:\u002F\u002Fcodebyzach.github.io\u002Fpace\u002F) css of your choice on your page\n(as early as possible), and you're done!\n\nPace will automatically monitor your ajax requests, event loop lag, document\nready state, and elements on your page to decide the progress. On ajax navigation\nit will begin again!\n\nIf you use AMD or Browserify, require pace.js and call `Pace.start()` as early in the loading process as possible.\n\nExample\n-------\n\n```html\n\u003Chead>\n  \u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fpace-js@1\u002Fpace.min.js\">\u003C\u002Fscript>\n  \u003Clink rel=\"stylesheet\" href=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fpace-js@1\u002Fpace-theme-default.min.css\">\n\u003C\u002Fhead>\n```\n\nConfiguration\n-------------\n\nPace is fully automatic, no configuration is necessary to get started.\n\nIf you would like to make some tweaks, here's how:\n\nYou can set `window.paceOptions` before bringing in the file:\n\n```javascript\npaceOptions = {\n  \u002F\u002F Disable the 'elements' source\n  elements: false,\n\n  \u002F\u002F Only show the progress on regular and ajax-y page navigation,\n  \u002F\u002F not every request\n  restartOnRequestAfter: false\n}\n```\n\nYou can also put options on the script tag (the value must be valid JSON):\n\n```html\n\u003Cscript data-pace-options='{ \"ajax\": false }' src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fpace-js@1\u002Fpace.min.js\">\u003C\u002Fscript>\n```\n\nPace reads its options once, when pace.js loads, so set them before including it.\nAssigning `Pace.options` afterwards has no effect.\n\nIf you load pace with a bundler or module loader (AMD or CommonJS), it doesn't start on its own:\nset `window.paceOptions` before pace loads, then call `Pace.start()`. `import` statements run\nbefore the rest of a file, so put the options in their own file and import it first:\n\n```javascript\n\u002F\u002F pace-options.js\nwindow.paceOptions = {\n  document: false\n};\n```\n\n```javascript\n\u002F\u002F your entry file\nimport '.\u002Fpace-options.js';\nimport Pace from 'pace-js';\n\nPace.start();\n```\n\nWith RequireJS, set `window.paceOptions` in a `\u003Cscript>` before calling `require(['pace'], ...)`.\n\nThemes\n------\n\nPace includes a bunch of [themes](https:\u002F\u002Fcodebyzach.github.io\u002Fpace\u002F)\nto get you started. Just include the appropriate css file. Send us a PR with\nany interesting themes you create.\n\nIf you have minor styling changes and don't want to extend theme css, you can add custom class names to\nthe progress bar using the \"className\" option:\n\n```javascript\npaceOptions = {\n  className: 'my-custom-class'\n}\n```\n\nCollectors\n----------\n\nCollectors are the bits of code which gather progress information. Pace includes four default collectors:\n\n- Ajax\n\n  Monitors ajax requests (XMLHttpRequest and WebSocket) on the page. Only `GET` requests are tracked by default, see Tracking below\n\n- Elements\n\n  Checks for the existence of specific elements on the page\n\n- Document\n\n  Checks the document readyState\n\n- Event Lag\n\n  Checks for event loop lag signaling that javascript is being executed\n\nThey can each be configured or disabled through configuration options of the same name.\n\n```javascript\npaceOptions = {\n  ajax: false, \u002F\u002F disabled\n  document: false, \u002F\u002F disabled\n  eventLag: false, \u002F\u002F disabled\n  elements: {\n    selectors: ['.my-page']\n  }\n};\n```\n\nAdd your own classes to `paceOptions.extraSources` to add more sources. Each source should either\nhave a `.progress` property, or a `.elements` property which is a list of objects with\n`.progress` properties. Pace will automatically handle all scaling to make the progress\nchanges look smooth to the user.\n\nElements\n--------\n\nElements being rendered to the screen is one way for us to decide that the page has been\nrendered. If you would like to use that source of information (not required at all),\nspecify one or more selectors. You can comma separate the selectors to properly handle\nerror states, where the progress bar should disappear, but the element we are looking for\nmay never appear:\n\n```javascript\npaceOptions = {\n  elements: {\n    selectors: ['.timeline, .timeline-error', '.user-profile, .profile-error']\n  }\n}\n```\n\nPace will consider the elements test successful when each selector matches something. For\nthis example, when either `.timeline` or `.timeline-error` exist, and either `.user-profile`\nor `.profile-error` exist.\n\nRestart Rules\n-------------\n\nMost users want the progress bar to automatically restart when a pushState event occurs\n(generally means ajax navigation is occuring). You can disable this:\n\n```javascript\npaceOptions = {\n  restartOnPushState: false\n}\n```\n\nThis also covers links whose scripts change the URL with `history.pushState` or `replaceState`\n(some tab, accordion and scrollspy plugins do).\n\nPace also restarts for any tracked ajax request that is still running after `restartOnRequestAfter`\nmilliseconds (500 by default). Set a different number, or `false` to turn this off if you make ajax\nrequests the user doesn't need to know about, like precaching:\n\n```javascript\npaceOptions = {\n  restartOnRequestAfter: false\n}\n```\n\nYou can always trigger a restart manually by calling `Pace.restart()`\n\nSee [the source](https:\u002F\u002Fgithub.com\u002FCodeByZach\u002Fpace\u002Fblob\u002Fmaster\u002Fpace.js) for a full list of options.\n\nAPI\n---\n\nPace exposes the following methods:\n\n- `Pace.start`: Show the progress bar and start updating. Called automatically if you don't use AMD or CommonJS.\n\n- `Pace.restart`: Show the progress bar if it's hidden and start reporting the progress from scratch. Called automatically\nwhenever `pushState` or `replaceState` is called by default.\n\n- `Pace.stop`: Hide the progress bar and stop updating it.\n\n- `Pace.track`: Explicitly track one or more requests, see Tracking below\n\n- `Pace.ignore`: Explicitly ignore one or more requests, see Tracking below\n\nEvents\n------\n\nPace fires the following events:\n\n- `start`: When pace is initially started, or as a part of a restart\n- `stop`: When pace is manually stopped, or as a part of a restart\n- `restart`: When pace is restarted (manually, or by a new AJAX request)\n- `progress`: On every frame while the bar is running, with the current progress (0–100)\n- `done`: When pace is finished\n- `hide`: When the pace is hidden (can be later than `done`, based on `ghostTime` and `minTime`)\n\nYou can bind onto events using the `on`, `off` and `once` methods:\n\n- `Pace.on(event, handler, [context])`: Call `handler` (optionally with context) when `event` is triggered\n- `Pace.off(event, [handler])`: Unbind the provided `event` and `handler` combination.\n- `Pace.once(event, handler, [context])`: Bind `handler` to the next (and only the next) incidence of `event`\n\nTracking\n--------\n\nBy default, Pace will show any ajax requests which begin as a part of a normal or ajax-y page load, or which last longer than\n500ms.\n\nOnly `GET` requests are tracked by default. To also show the bar for other methods, such as form saves sent with `POST`:\n\n```javascript\npaceOptions = {\n  ajax: {\n    trackMethods: ['GET', 'POST']\n  }\n}\n```\n\nYou can disable all ajax tracking by setting `ajax` to false:\n\n```javascript\npaceOptions = {\n  ajax: false\n}\n```\n\nYou can disable ajax tracking except on page navigation by setting `restartOnRequestAfter` to false:\n\n```javascript\npaceOptions = {\n  restartOnRequestAfter: false\n}\n```\n\nYou can manually disable tracking for a specific request or requests by triggering them within a `Pace.ignore` callback:\n\n```javascript\nPace.ignore(function() {\n  $.ajax(...)\n});\n```\n\nYou can force the progress bar to be shown for a specific request by triggering them within a `Pace.track` callback:\n\n```javascript\nPace.track(function() {\n  $.ajax(...)\n});\n```\n\nBoth only affect requests opened directly inside the callback, not ones started later (for example from a timer or a promise).\n\nYou can also ignore URLs based on a pattern:\n\n```javascript\npaceOptions = {\n  ajax: {\n    ignoreURLs: ['some-substring', \u002Fsome-regexp\u002F]\n  }\n}\n```\n\nA string matches any ajax request URL that contains it (case-sensitive); a regular expression is tested against\nthe URL. These patterns only apply to ajax requests, not to links, images or other resources on the page.\n\nWebSocket connections are tracked too. To stop that, set `trackWebSockets: false` inside `ajax`.\n\nA few things Pace can't track:\n\n- Requests sent with `async: false` block the page until they finish, so the bar can't animate during them.\n- Downloads started by a plain link aren't ajax requests.\n\nAvoid calling `Pace.restart()` for every request, for example from jQuery's `ajaxStart`. It restarts the bar even for\nignored requests, and parallel requests restart it several times. To show the bar for `POST` requests, add `POST` to\n`trackMethods` as shown above.\n\nDependencies\n------------\n\nNone!\n\nSupport\n-------\n\nPace is designed to support IE8+ (standards mode), FF 3.5+, Chrome, Safari 4+, Opera 10.5+, and all modern\nmobile browsers. If you run into a compatibility issue, or can make a case for supporting something else,\nplease create an issue.\n\nSize\n----\n\npace.js is 4kb minified and gzipped. The themes vary between 0.5 and 4kb.\n\nIssues\n------\n\nWe have obviously not tested this on every website. If you run into an issue, or find a way the automatic\ndetection could be better, please [create an Issue](https:\u002F\u002Fgithub.com\u002FCodeByZach\u002Fpace\u002Fissues\u002Fnew). If you can include a test case, that's even better.\n\nCredits\n-------\n\n[HubSpot](http:\u002F\u002Fdev.hubspot.com)\n\n[CodeByZach](https:\u002F\u002Fgithub.com\u002FCodeByZach)\n\nJavascript by [Zack Bloom](http:\u002F\u002Ftwitter.com\u002Fzackbloom)\nCSS by [Adam Schwartz](http:\u002F\u002Ftwitter.com\u002Fadamfschwartz)\n\nThemes inspired by [Mary Lou](http:\u002F\u002Ftympanus.net\u002Fcodrops\u002F2013\u002F09\u002F18\u002Fcreative-loading-effects\u002F)\n\nProject inspired by [nprogress](http:\u002F\u002Fricostacruz.com\u002Fnprogress\u002F)\n","PACE 是一个自动为网页添加加载进度条的轻量级 JavaScript 库。它无需手动干预即可实时监测 AJAX 请求、DOM 就绪状态、事件循环延迟及页面元素渲染，动态计算并渲染进度条；支持多种内置主题，可通过 script 标签或模块化方式（AMD\u002FCommonJS）集成，配置灵活且零依赖。适用于需要提升用户等待体验的单页应用（SPA）、传统多页网站或后台管理系统的加载状态反馈场景。",2,"2026-11-24 04:36:40","top_language"]