{"id":20080688,"url":"https://github.com/cloud8421/platform-detector","last_synced_at":"2025-06-14T02:06:29.696Z","repository":{"id":1435156,"uuid":"1649704","full_name":"cloud8421/Platform-detector","owner":"cloud8421","description":"A small javascript library to detect the browser's identity even when it's faked","archived":false,"fork":false,"pushed_at":"2011-05-20T13:55:20.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T13:26:25.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/cloud8421/Platform-detector","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bitbonsai/facyBox","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud8421.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2011-04-22T13:43:38.000Z","updated_at":"2013-10-10T06:02:25.000Z","dependencies_parsed_at":"2022-08-16T13:20:33.435Z","dependency_job_id":null,"html_url":"https://github.com/cloud8421/Platform-detector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloud8421/Platform-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2FPlatform-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2FPlatform-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2FPlatform-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2FPlatform-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud8421","download_url":"https://codeload.github.com/cloud8421/Platform-detector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2FPlatform-detector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259747233,"owners_count":22905313,"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":[],"created_at":"2024-11-13T15:29:38.731Z","updated_at":"2025-06-14T02:06:29.667Z","avatar_url":"https://github.com/cloud8421.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"###Platform detector 0.1\n \nBy Claudio Ortolina (claudio@jumpzero.com)\n\nThis simple script tries to solve a potential issue when some people fake their User Agent when browsing a specific site.\n\nSome of them may do it for legitimate reasons: pretending to use Mobile Safari even on the desktop lets you sometimes avoid Flash video and use HTML5. There are however issues when you use user agent detection to serve different files or change Javascript logic.\n\nThis script is not at all a replacemente for tools like Modernizr. It simply aims to tell you what kind of platform you're dealing with. There are no version numbers or more granular parameters.\n\nPlease take into account that this script doesn't tell you what kind of support you have for a specific feature on a specific browser. Once again, Modernizr is a good tool for that.\n\nUsage is simple. Just link it in your header\n\n    \u003cscript type=\"text/javascript\" src=\"platform_detector.js\"\u003e\u003c/script\u003e\n\nThen you can access it by running the main function and assigning it to a variable:\n\n    \u003cscript\u003e\n      var platform = platform_detector();\n    \u003c/script\u003e\n\nThe platform object you have now is made like this:\n\n    platform = {\n      pretend : 'what the browser is telling you it is',\n      real: 'what the browser is under the hood'\n    }\n\nWhat's missing:\n\n- More bulletproof regexp detection (for Safari and Chrome)\n- Additional parameters for other browsers on other platforms (that requires some testing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud8421%2Fplatform-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud8421%2Fplatform-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud8421%2Fplatform-detector/lists"}