{"id":20887814,"url":"https://github.com/litetex/t-rex-runner","last_synced_at":"2025-06-12T23:36:48.164Z","repository":{"id":104317566,"uuid":"294987692","full_name":"litetex/t-rex-runner","owner":"litetex","description":"The T-Rex 🦖 runner game extracted from chromium ","archived":false,"fork":false,"pushed_at":"2022-03-09T20:55:41.000Z","size":699,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-05-12T19:46:08.531Z","etag":null,"topics":["browser","chrome","chromium","darkmode","dino","easter-egg","google","javascript","no-internet-game","t-rex-game","t-rex-runner"],"latest_commit_sha":null,"homepage":"https://litetex.github.io/t-rex-runner/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litetex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-09-12T16:58:12.000Z","updated_at":"2024-11-26T13:31:52.000Z","dependencies_parsed_at":"2023-03-13T14:58:39.644Z","dependency_job_id":null,"html_url":"https://github.com/litetex/t-rex-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/litetex/t-rex-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litetex%2Ft-rex-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litetex%2Ft-rex-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litetex%2Ft-rex-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litetex%2Ft-rex-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litetex","download_url":"https://codeload.github.com/litetex/t-rex-runner/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litetex%2Ft-rex-runner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259550591,"owners_count":22875330,"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":["browser","chrome","chromium","darkmode","dino","easter-egg","google","javascript","no-internet-game","t-rex-game","t-rex-runner"],"created_at":"2024-11-18T08:22:51.123Z","updated_at":"2025-06-12T23:36:48.153Z","avatar_url":"https://github.com/litetex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Online version](https://img.shields.io/website?down_message=down%20%F0%9F%92%A4\u0026label=online%20version\u0026style=flat-square\u0026up_message=running%20%F0%9F%A6%96\u0026url=https%3A%2F%2Flitetex.github.io%2Ft-rex-runner%2F)](https://litetex.github.io/t-rex-runner/)\n[![Latest stable docker version](https://img.shields.io/badge/docker-latest-%232684ff?style=flat-square)](https://hub.docker.com/r/litetex/t-rex-runner/tags?name=latest)\n\n## t-rex-runner 🦖\n\nThis is an updated version of the t-rex-runner game, originally extracted by [wayou/t-rex-runner](https://github.com/wayou/t-rex-runner)\n\n[source](https://cs.chromium.org/chromium/src/components/neterror/resources/offline.js) from chromium\n\nYou can find a online version at https://litetex.github.io/t-rex-runner/\n\n![demo dino](dino.gif)\n\n## How to run it\n\nUnfortunately it's only possible to run the code on a webserver.\u003cbr/\u003e\nYou can find the exact reason [here](https://stackoverflow.com/questions/48753691/cannot-access-cssrules-from-local-css-file-in-chrome-64)\n\nA simple predefined image exists at [DockerHub](https://hub.docker.com/r/litetex/t-rex-runner)\n\nHowever here is a quick setup if you wan't to build it yourself using docker\n* Get Docker\n* Build it with\n```SHELL\ndocker build -t my-trex-runner-demo .\n```\n* Start it with \n```SHELL\ndocker run --rm -it --name trex-runner-demo -p 8080:80 my-trex-runner-demo\n```\n* Open http://localhost:8080\n* Shutdown the server/container with ``Ctrl + C`` or by running\n```SHELL\ndocker rm -f trex-runner-demo\n```\n\nAll in one:\n```SHELL\ndocker build -t my-trex-runner-demo . \u0026\u0026 docker run --rm -it --name trex-runner-demo -p 8080:80 my-trex-runner-demo\n```\n\n## How to extract the required code\n* Clone the [chromium repo](https://chromium.googlesource.com/chromium/src)\u003cbr/\u003e\n  * Chromium is a really large repo (as of now it has nearly 1 million Commits and the default branch with only the latest commits alone consumes 4GB of disk memory) so you should clone it only optimized: \n  ```\n  git clone --depth 1 --branch master https://chromium.googlesource.com/chromium/src\n  ```\n* Check the dependencies of the [neterror component html page](https://source.chromium.org/chromium/chromium/src/+/master:components/neterror/resources/neterror.html)\n  * More details can also be found in [this build file](https://source.chromium.org/chromium/chromium/src/+/master:components/neterror/resources/BUILD.gn)\n* Currently the components ``components/neterror`` and ``components/security_interstitials`` are required, so let's extract them\n* Extract those dependencies (copy the directories) into a new directory\n\n## Migration\n* Clean not required stuff from the html file, e.g. i18n or not used parts of the div\n* The sounds have to be served encoded in Base64, so encode them and add them directly\n* Remove the complicated ``neterror.js`` and replace it at the end of the body with a simple ``\u003cscript\u003enew Runner('.interstitial-wrapper');\u003c/script\u003e``\n* Clean up ``offline.js`` by removing external dependencies or merging them into the file\u003cbr\u003e e.g. ``loadTimeData`` is only used to determine if [the game should be disabled](https://source.chromium.org/chromium/chromium/src/+/c117d8c5553c5143dd8723575a5d6113e8169490:components/neterror/resources/offline.js;l=243-267), which we totally don't need\n* The JS-Constant ``\u003cscript\u003econst HIDDEN_CLASS = 'hidden';\u003c/script\u003e`` is required\n* Simplify the stylesheets into a single one and clean up not required stuff\n* Remove unnecessary images\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitetex%2Ft-rex-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitetex%2Ft-rex-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitetex%2Ft-rex-runner/lists"}