{"id":13822020,"url":"https://github.com/ErlendEllingsen/pull-to-reload","last_synced_at":"2025-05-16T15:32:18.307Z","repository":{"id":65004540,"uuid":"83792024","full_name":"ErlendEllingsen/pull-to-reload","owner":"ErlendEllingsen","description":"Pull to reload implementation for the web. Designed to work with both mobile and websites. ","archived":false,"fork":false,"pushed_at":"2017-05-19T07:46:12.000Z","size":50,"stargazers_count":394,"open_issues_count":1,"forks_count":18,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-07-10T18:46:22.133Z","etag":null,"topics":["html","html5","hybrid-apps","javascript","plugin","pull-down-refresh","pull-to-refresh","pull-to-reload","single-page-applications","touch","webapps"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ErlendEllingsen.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}},"created_at":"2017-03-03T11:35:27.000Z","updated_at":"2024-05-03T09:12:55.000Z","dependencies_parsed_at":"2023-01-01T00:29:40.924Z","dependency_job_id":null,"html_url":"https://github.com/ErlendEllingsen/pull-to-reload","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErlendEllingsen%2Fpull-to-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErlendEllingsen%2Fpull-to-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErlendEllingsen%2Fpull-to-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErlendEllingsen%2Fpull-to-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErlendEllingsen","download_url":"https://codeload.github.com/ErlendEllingsen/pull-to-reload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213893315,"owners_count":15653524,"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","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":["html","html5","hybrid-apps","javascript","plugin","pull-down-refresh","pull-to-refresh","pull-to-reload","single-page-applications","touch","webapps"],"created_at":"2024-08-04T08:01:38.365Z","updated_at":"2024-08-04T08:07:30.402Z","avatar_url":"https://github.com/ErlendEllingsen.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ☝️👇 pull-to-reload\n[![npm version](https://badge.fury.io/js/pull-to-reload.svg)](https://badge.fury.io/js/pull-to-reload) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n\nThis is a pull to refresh implementation for the web. Designed to work with both mobile and desktop devices. Fits nicely with web-apps or single-page applications (SPA). *Configurable to the seventh degree.*\n\n## 🌵Preview \n\n\u003cimg src=\"https://fat.gfycat.com/AnyHeartfeltBarnswallow.gif\" height=\"400px\" alt=\"Functionality demo\"\u003e\n\n### Demo:\n[https://erlendellingsen.github.io/pull-to-reload/](https://erlendellingsen.github.io/pull-to-reload/)\n\n\n## Install \n\n### NPM (Recommended)\n\n`npm install pull-to-reload`\n\n### Direct ([Download](https://github.com/ErlendEllingsen/pull-to-reload/releases))\n\nAdd `pull-to-reload.js` to your project. \n\n## 🌿Usage \nQuick example: \n\n**Html**\n\n```html\n\u003cdiv id=\"ptr\"\u003e\n    ...\n\u003c/div\u003e\n\n\u003cdiv id=\"content\"\u003e\n    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores doloribus harum sed odit optio, fuga nam modi quod beatae? Tempore sunt molestiae, soluta quas unde exercitationem, modi accusamus pariatur reiciendis!\n\u003c/div\u003e\n```\n\n**Javascript**\n\n```javascript\n$(document).ready(function(){\n    var ptr = new PullToReload({ \n        'callback-loading': function(){\n            setTimeout(function(){\n                ptr.loadingEnd();\n            }, 5000);\n        }\n    });\n});\n\n```\n\n\nAvailable options:\n\n```javascript\nthis.opts = {\n        'refresh-element': 'ptr', //Required\n        'content-element': 'content', //Required\n        'border-height': 1,\n        'height': 80,\n        'font-size': '30px',\n        'threshold': 20,\n        'pre-content': '...',\n        'loading-content': 'Loading...',\n        'callback-loading': function(){ setTimeout(function(){ self.loadingEnd(); }, 1000); } //Required\n    }\n```\n\n\n## 📎 Dependencies\n*None* 🔥 \n\n## 🥇 Contributors\n* NathanHeffley *(Removed jQuery dependency)*\n* mdczaplicki *(Minified version)*\n\n## 💪🏽 Contribute\nIf you'd like to contribute to this project you can do so by creating a *fork* and send in a *pull-request*. \n\nMake sure to write detailed comments and state your changes when sending in a PR. Keep the code style equal to the current.\n\nContributions are very much appreciated 😍!\n\n### Topics where help is wanted/needed\n* Code: Making *pull-to-reload* **not** block regular scrolling functionality (e.g. in mobile apps).\n* Documentation/Wiki - Detailed how to/setup\n\n## License\nAs most of my other projects, this project is licensed as **MIT**.\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FErlendEllingsen%2Fpull-to-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FErlendEllingsen%2Fpull-to-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FErlendEllingsen%2Fpull-to-reload/lists"}