{"id":15027649,"url":"https://github.com/hubspot/offline","last_synced_at":"2025-10-22T18:33:19.322Z","repository":{"id":37773772,"uuid":"13753838","full_name":"HubSpot/offline","owner":"HubSpot","description":"Automatically display online/offline indication to your users","archived":true,"fork":false,"pushed_at":"2023-02-26T00:19:50.000Z","size":1403,"stargazers_count":8618,"open_issues_count":119,"forks_count":841,"subscribers_count":334,"default_branch":"master","last_synced_at":"2025-10-05T16:08:24.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.hubspot.com/offline/docs/welcome","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HubSpot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-10-21T20:14:57.000Z","updated_at":"2025-10-05T10:08:00.000Z","dependencies_parsed_at":"2022-08-19T09:50:14.702Z","dependency_job_id":"a6c244f5-0bb9-4bab-b55e-27dc232cd43a","html_url":"https://github.com/HubSpot/offline","commit_stats":{"total_commits":288,"total_committers":40,"mean_commits":7.2,"dds":0.6354166666666667,"last_synced_commit":"a17291864212aab9ae9325c7ce5a2e0f541e96bf"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/HubSpot/offline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Foffline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Foffline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Foffline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Foffline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpot","download_url":"https://codeload.github.com/HubSpot/offline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2Foffline/sbom","scorecard":{"id":63578,"data":{"date":"2025-08-11","repo":{"name":"github.com/HubSpot/offline","commit":"a17291864212aab9ae9325c7ce5a2e0f541e96bf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":5,"reason":"Found 7/13 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T02:11:14.712Z","repository_id":37773772,"created_at":"2025-08-15T02:11:14.712Z","updated_at":"2025-08-15T02:11:14.712Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278479475,"owners_count":25993864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:06:50.351Z","updated_at":"2025-10-05T17:31:44.056Z","avatar_url":"https://github.com/HubSpot.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"___\n\n**This project isn't actively maintained.**\n___\n\nOffline\n======\n\n**Note to users pre-0.6.0:  Offline previously used a cloudfront hosted file as one of it's methods of detecting the connection status.  This method is now deprecated and the image has been removed.  Please upgrade to Offline 0.7.0+.**\n\nImprove the experience of your app when your users lose connection.\n\n- Monitors ajax requests looking for failure\n- Confirms the connection status by requesting an image or fake resource\n- Automatically grabs ajax requests made while the connection is down and remakes them\n  after the connection is restored.\n- Simple UI with beautiful themes\n- 3kb minified and compressed\n\nInstallation\n-------------------\n\nInclude [the javascript](https://raw.github.com/HubSpot/offline/v0.7.14/offline.min.js), one of [the themes](http://github.hubspot.com/offline/docs/welcome/), and one of [the\nlanguages](https://github.com/HubSpot/offline/tree/master/themes) on your site.  You're done!\n\nTo use only the JavaScript API without a UI indicator, simply leave out the CSS file.\n\nIf you'd like to get a peek at how it looks on your site, disconnect your internet, or try out the [simulator](http://craigshoemaker.github.io/offlinejs-simulate-ui/).\n\nAdvanced\n--------\n\nOptionally, you can provide some configuration by setting `Offline.options` after\nbringing in the script.\n\nOptions (any can be provided as a function), with their defaults:\n\n```javascript\n{\n  // Should we check the connection status immediatly on page load.\n  checkOnLoad: false,\n\n  // Should we monitor AJAX requests to help decide if we have a connection.\n  interceptRequests: true,\n\n  // Should we automatically retest periodically when the connection is down (set to false to disable).\n  reconnect: {\n    // How many seconds should we wait before rechecking.\n    initialDelay: 3,\n\n    // How long should we wait between retries.\n    delay: (1.5 * last delay, capped at 1 hour)\n  },\n\n  // Should we store and attempt to remake requests which fail while the connection is down.\n  requests: true,\n\n  // Should we show a snake game while the connection is down to keep the user entertained?\n  // It's not included in the normal build, you should bring in js/snake.js in addition to\n  // offline.min.js.\n  game: false\n}\n```\n\nProperties\n----------\n\n`Offline.check()`: Check the current status of the connection.\n\n`Offline.state`: The current state of the connection 'up' or 'down'\n\n`Offline.on(event, handler, context)`: Bind an event.  Events:\n\n  - up: The connection has gone from down to up\n  - down: The connection has gone from up to down\n  - confirmed-up: A connection test has succeeded, fired even if the connection was already up\n  - confirmed-down: A connection test has failed, fired even if the connection was already down\n  - checking: We are testing the connection\n  - reconnect:started: We are beginning the reconnect process\n  - reconnect:stopped: We are done attempting to reconnect\n  - reconnect:tick: Fired every second during a reconnect attempt, when a check is not happening\n  - reconnect:connecting: We are reconnecting now\n  - reconnect:failure: A reconnect check attempt failed\n  - requests:flush: Any pending requests have been remade\n  - requests:capture: A new request is being held\n\n`Offline.off(event, handler)`: Unbind an event\n\nChecking\n--------\n\nBy default, Offline makes an XHR request to load your `/favicon.ico` to check the connection.  If you don't\nhave such a file, it will 404 in the console, but otherwise work fine (even a 404 means the connection is up).\nYou can change the URL it hits (an endpoint which will respond with a quick 204 is perfect):\n\n```javascript\nOffline.options = {checks: {xhr: {url: '/connection-test'}}};\n```\n\nMake sure that the URL you check has the same origin as your page (the connection method, domain and port all must be the same), or you\nwill run into CORS issues.  You can add `Access-Control` headers to the endpoint to fix it on modern browsers, but it will still cause issues on\nIE9 and below.\n\nIf you do want to run tests on a different domain, try the image method.  It loads an image, which are allowed to cross domains.\n\n```javascript\nOffline.options = {checks: {image: {url: 'my-image.gif'}, active: 'image'}}\n```\n\nThe one caveat is that with the image method, we can't distinguish a 404 from a genuine connection issue, so any error at all will\nappear to Offline as a connection issue.\n\nOffline also includes a check called `'up'` and another called `'down'` which will always report being up or down respectively for\ntesting.  You can activate them by setting the `active` option, adding a data attribute to your script tag with the name\n`data-simulate` and value `'up'` or `'down'`, or by setting `localStorage.OFFLINE_SIMULATE` to `'up'` or `'down'`.\n\nReconnect\n---------\n\nThe reconnect module automatically retests the connection periodically when it is down.\nA successful AJAX request will also trigger a silent recheck (if `interceptRequests` is not false).\n\nYou can disable the reconnect module by setting the `reconnect` to false.  Reconnect can be\nconfigured by setting options on the reconnect setting.\n\nRequests\n--------\n\nThe requests module holds any failed AJAX requests and, after deduping them, remakes them when the connection\nis restored.\n\nYou can disable it by setting the `requests` setting to false.\n\nYou can also set deDupBody to be true if you want deduping to also take into account the content of the request.\n\nDependencies\n------------\n\nNone!\n\nBrowser Support\n---------------\n\nModern Chrome, Firefox, Safari and IE8+\n\nNote that not all browsers (including Safari and old IE) support the offline events, forcing Offline to use less accurate methods of detection.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Foffline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubspot%2Foffline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Foffline/lists"}