{"id":13561933,"url":"https://github.com/denar90/sloth","last_synced_at":"2025-04-13T21:35:53.447Z","repository":{"id":89054102,"uuid":"123617235","full_name":"denar90/sloth","owner":"denar90","description":"Sloth - an extension slowing down page loading to bring real user experience","archived":false,"fork":false,"pushed_at":"2019-05-03T21:41:27.000Z","size":110,"stargazers_count":196,"open_issues_count":3,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-23T01:10:17.853Z","etag":null,"topics":["chrome-extension","devtools","productivity","sloth"],"latest_commit_sha":null,"homepage":"https://chrome.google.com/webstore/detail/sloth/hekdlpaieaibohkfokedfidncnmocfpp","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/denar90.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}},"created_at":"2018-03-02T18:45:10.000Z","updated_at":"2024-01-21T06:57:39.000Z","dependencies_parsed_at":"2023-06-13T17:45:41.052Z","dependency_job_id":null,"html_url":"https://github.com/denar90/sloth","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/denar90%2Fsloth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fsloth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fsloth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fsloth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denar90","download_url":"https://codeload.github.com/denar90/sloth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788343,"owners_count":21161723,"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":["chrome-extension","devtools","productivity","sloth"],"created_at":"2024-08-01T13:01:02.731Z","updated_at":"2025-04-13T21:35:53.415Z","avatar_url":"https://github.com/denar90.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","DevTools Extensions"],"sub_categories":["Performance"],"readme":"# Sloth \n\nAn extension that slowing down network and CPU and makes you experience web page performance as your real users.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/6231516/36938869-cb6b0c92-1f30-11e8-9085-26b386b7a39a.gif\"\u003e\n\u003c/p\u003e\n\nDo you think that users have fast device/connection as you as developer has?\n\nNo they are not. Their devices/connections are slow! Very slooow! `Sloth` makes you suffer browsing the web like your real users.\n\n---\n\n## Recently asked questions\n\n### How it works?\n\n`Sloth` uses [Chrome Devtools Protocol](https://chromedevtools.github.io/devtools-protocol/) to slow down connection and throttle CPU.\n\n### What are the conditions?\n\n`Sloth` applies `4x` CPU throttling and slowing down network to `1.6Mbps` - for download, `750Kbps` - for upload.\nInterested in optional configurations - take a part in [issue](https://github.com/denar90/sloth/issues/1) discussion \n\n\n### Why do I need it while @chrome-devtools can do the same?\n\nYes and no. DevTools can do it for opened tab, but you have to do a lot of manipulations to apply throttling (open dev tools, open proper tab, apply throttling etc). This extension is for lazy people, you just press one button and all URLs with same origin will have throttling. Handy isn't it?\n \n ----\n\n## Development\n\nAfter adding new permissions commands below has to be run.\n\n```\n# Create private key called key.pem\n2\u003e/dev/null openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out key.pem\n\n# Generate string to be used as \"key\" in manifest.json (outputs to stdout)\n2\u003e/dev/null openssl rsa -in key.pem -pubout -outform DER | openssl base64 -A\n\n# Calculate extension ID (outputs to stdout). Should be added to URL to path to extention page, aka chrome-extension://new_generate_key/popup.html\n2\u003e/dev/null openssl rsa -in key.pem -pubout -outform DER |  shasum -a 256 | head -c32 | tr 0-9a-f a-p\n \n```\n\n## Testing\n\nExtension is tested using [puppeteer](https://github.com/GoogleChrome/puppeteer).\nToken was generated to rich tested extension page. It's value stored in fixtures the same as fixture for manifest.json.\nAll other files (background.js, popup.html, popup.js) are symlinks (./extension -\u003e ./test/fixtures)\n\n\u003e Note: to update symlink files run: ln -s \"$(pwd)\"/extension/* test/fixtures/\n\n\n## Demo\n\n- `npm run run-regular-site-demo` \n- open `http://localhost:8000/`\n- `npm run run-throttled-site-demo`\n- open pages `http://localhost:8001/`, `http://localhost:8001/page-2.html` and apply throttling with extension for them\n\nWatch demo [here](https://twitter.com/denar90_/status/971152543781933056)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenar90%2Fsloth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenar90%2Fsloth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenar90%2Fsloth/lists"}