{"id":28239190,"url":"https://github.com/lotusk08/instantview","last_synced_at":"2025-10-09T01:32:25.299Z","repository":{"id":291416478,"uuid":"977560435","full_name":"lotusk08/instantview","owner":"lotusk08","description":"Make the website faster by preloading pages on hover","archived":false,"fork":false,"pushed_at":"2025-05-06T05:11:52.000Z","size":33698,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T02:11:49.898Z","etag":null,"topics":["hover-effects","instantclick","instantview","javascript","preloading"],"latest_commit_sha":null,"homepage":"https://dev.lotusk08-github-io.pages.dev/","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/lotusk08.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-04T13:42:42.000Z","updated_at":"2025-05-06T05:11:55.000Z","dependencies_parsed_at":"2025-05-04T14:44:44.022Z","dependency_job_id":null,"html_url":"https://github.com/lotusk08/instantview","commit_stats":null,"previous_names":["lotusk08/instantview"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotusk08%2Finstantview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotusk08%2Finstantview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotusk08%2Finstantview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotusk08%2Finstantview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lotusk08","download_url":"https://codeload.github.com/lotusk08/instantview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotusk08%2Finstantview/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259221888,"owners_count":22823979,"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":["hover-effects","instantclick","instantview","javascript","preloading"],"created_at":"2025-05-19T02:11:51.967Z","updated_at":"2025-10-09T01:32:20.263Z","avatar_url":"https://github.com/lotusk08.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instantview\nMake the website faster by preloading pages on hover\n\nThis is a mini script like instantclick, but well-structured version:\n- Script Sandboxing System\n- Improved Script Registry\n- Controlled Script Execution\n- Script Context Management\n- Global Variable Preservation\n- Better Error Handling\n- Script Dependency Management\n\n## Core functionality remains:\n\n- [x] Link prefetching on hover/mousedown\n- [x] Fast page transitions\n- [x] History state management\n- [x] Script handling during transitions\n- [ ] Enhance with new perf like DOM-Less feature \u0026 rewrite in ES6 *- I think for myself*\n\n## How to use InstantView\nTo use this library on your website:\n\n1. Include the JavaScript file in your HTML(header/footer):\n\n```html\n\u003cscript src=\"instantview.js\"\u003e\u003c/script\u003e\n```\n\n2. Initialize it when the DOM is ready (HTML in header/footer):\n\n```html\n\u003cscript\u003e\n  document.addEventListener(\"DOMContentLoaded\", function() {\n\tInstantView.init();\n  });\n\u003c/script\u003e\n```\n3. Optional: Add configuration options\n\n```html\n\u003cscript\u003e\n  document.addEventListener(\"DOMContentLoaded\", function() {\n\t// Use mousedown instead of mouseover (faster perceived speed but less preloading)\n\tInstantView.init(\"mousedown\");\n\t\n\t// Add a delay in milliseconds before preloading (reduce unnecessary requests)\n\tInstantView.init(100);\n\t\n\t// Use whitelist mode (only preload links with data-instant attribute)\n\tInstantView.init(true);\n\t\n\t// Combine options\n\tInstantView.init(true, \"mousedown\", 50);\n  });\n\u003c/script\u003e\n```\n\n4. Optional: Listen for events\n\n```html\n\u003cscript\u003e\n  InstantView.on(\"change\", function() {\n\t// Page has changed\n\tsetupAnalytics();\n  });\n  \n  InstantView.on(\"fetch\", function() {\n\t// Page fetch started\n\tshowCustomLoadingIndicator();\n  });\n\u003c/script\u003e\n```\n## Demo\n![demo](demo-on-site.gif)\n_I tested in my site_\n\nLink: https://dev.lotusk08-github-io.pages.dev/\n\n## Issue?\nRead the [WIKI](https://github.com/lotusk08/instantview.wiki.git)\n\n## Source\nThank to [InstantClick](http://instantclick.io) \u0026 [EGOIST](https://github.com/egoist/instantclick) libraries.\n\n## License\n\n[MIT](/LICENSE) \u0026copy; [stevehoang.com](https://stevehoang.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotusk08%2Finstantview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flotusk08%2Finstantview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotusk08%2Finstantview/lists"}