{"id":18809024,"url":"https://github.com/lesaff/statamic-browserinfo","last_synced_at":"2026-01-10T03:30:15.115Z","repository":{"id":33243120,"uuid":"36887464","full_name":"lesaff/statamic-browserinfo","owner":"lesaff","description":"Get browser user agent information","archived":false,"fork":false,"pushed_at":"2015-10-06T05:27:30.000Z","size":508,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T22:36:52.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/lesaff.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}},"created_at":"2015-06-04T18:15:32.000Z","updated_at":"2017-10-31T02:08:25.000Z","dependencies_parsed_at":"2022-08-17T22:45:28.586Z","dependency_job_id":null,"html_url":"https://github.com/lesaff/statamic-browserinfo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesaff%2Fstatamic-browserinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesaff%2Fstatamic-browserinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesaff%2Fstatamic-browserinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesaff%2Fstatamic-browserinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lesaff","download_url":"https://codeload.github.com/lesaff/statamic-browserinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239743057,"owners_count":19689428,"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-07T23:14:59.248Z","updated_at":"2026-01-10T03:30:15.034Z","avatar_url":"https://github.com/lesaff.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Browser Detection Add-on for Statamic\nBy Rudy Affandi (2015)\n\nVersion 1.0.2\n\n## What is this?\n`browserinfo` returns detailed information about the visiting browser.\n\n## Changelog\n- 1.0.2: Added user agent\n- 1.0.1: Added slugify option, returns slugified output as default\n- 1.0.0: Initial release\n\n## Installation\nCopy the 'browserinfo' folder to the '_add-ons' folder in your Statamic website.\n\n## How to use\n```\n    {{ browserinfo:language slugify=\"true|false\" }} returns browser language setting\n    {{ browserinfo:browser slugify=\"true|false\" }} returns browser info (name and major version)\n    {{ browserinfo:browser_name slugify=\"true|false\" }} returns browser name\n    {{ browserinfo:browser_version show=\"all|major|minor|patch\" }} returns browser version, default is major version\n    {{ browserinfo:os slugify=\"true|false\" }} returns browser operating system info (name and major version)\n    {{ browserinfo:os_name slugify=\"true|false\" }} returns browser operating system name\n    {{ browserinfo:os_version show=\"all|major|minor|patch\" }} returns browser operating system version, default is major version.\n    {{ browserinfo:device_type slugify=\"true|false\" }} returns browser device type\n    {{ browserinfo:device_brand slugify=\"true|false\" }} returns browser device brand\n    {{ browserinfo:device_model slugify=\"true|false\" }} returns browser device model\n    {{ browserinfo:user_agent slugify=\"true|false\" }} returns browser user agent\n```\n\n### Available parameters\n`slugify` By default, this is set to `true`. Options (`true`, `false`)\n`show` This parameter available for the version tag only. Options (`all`, `major`, `minor`, `patch`)\n\n### Use case\nUse it in your `\u003chtml\u003e` tag\n```\n\u003chtml class=\"{{ browserinfo:browser }}\"\u003e\n```\n\nUse it for conditionals\n```\n{{ if {browserinfo:browser} == 'chrome-43' }}\n    You are using Chrome 43\n{{ else }}\n    You are not using Chrome 43\n{{ /if }}\n```\nor\n```\n{{ if {browserinfo:browser_name} == 'chrome' AND {browserinfo:browser_version show=\"major\"} \u003c 43 }}\n    do something\n{{ /if}}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesaff%2Fstatamic-browserinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flesaff%2Fstatamic-browserinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesaff%2Fstatamic-browserinfo/lists"}