{"id":18322210,"url":"https://github.com/dvhb/badbrowser","last_synced_at":"2025-12-12T04:16:15.264Z","repository":{"id":35495225,"uuid":"39764833","full_name":"dvhb/badbrowser","owner":"dvhb","description":"The library checks user client and shows a warning if the browser version does not meet minimal requirements.","archived":false,"fork":false,"pushed_at":"2020-08-27T06:05:17.000Z","size":528,"stargazers_count":48,"open_issues_count":2,"forks_count":13,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-21T13:22:55.038Z","etag":null,"topics":["badbrowser","browser","javascript","qa"],"latest_commit_sha":null,"homepage":"https://dvhb.github.io/badbrowser/","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/dvhb.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-27T08:59:09.000Z","updated_at":"2025-01-27T22:00:47.000Z","dependencies_parsed_at":"2022-09-08T19:11:27.705Z","dependency_job_id":null,"html_url":"https://github.com/dvhb/badbrowser","commit_stats":null,"previous_names":["dvhbru/dvhb-badbrowser"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvhb%2Fbadbrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvhb%2Fbadbrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvhb%2Fbadbrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvhb%2Fbadbrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvhb","download_url":"https://codeload.github.com/dvhb/badbrowser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415783,"owners_count":20935383,"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":["badbrowser","browser","javascript","qa"],"created_at":"2024-11-05T18:23:46.608Z","updated_at":"2025-12-12T04:16:10.239Z","avatar_url":"https://github.com/dvhb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @dvhb/badbrowser [![Build Status](https://travis-ci.org/dvhb/badbrowser.svg?branch=master)](https://travis-ci.org/dvhb/badbrowser)\n\n## Install\n```\nnpm i @dvhb/badbrowser\n```\n\n## Demo\nhttp://dvhb.github.io/badbrowser/\n\n## Using\n```js\nimport badbrowser from '@dvhb/badbrowser';\n\nnew badbrowser();\n```\n\nYou can put html for custom alert windows in `/alerts/` with this pattern:\n```\nalerts/\n ru.html\n en.html\n ...\n```\n\nYou may take an example of html code for your custom alert from `/dist/alerts/en.html`\n\n\n### Example\n\nDesktop\n\n* Microsoft Edge, 12+;\n* Mozilla Firefox, 37+;\n* Google Chrome, 41+;\n* Opera, 28+;\n* Apple Safari, 8+;\n* Yandex Browser, 15+.\n\nMobile\n\n* Mobile Safari, 7+\n* Android Browser, 4+\n* Chrome Mobile, 41+;\n* Internet Explorer Mobile, 11+;\n\n```js\nnew badbrowser({\n    // Min version of browser that will be supported\n    supported: {\n        msedge: '12',\n        firefox: '37',\n        chrome: '41',\n        opera: '28',\n        safari: '8',\n        yandexbrowser: '15',\n        safari_mobile: '7',\n        android: '4',\n        chrome_mobile: '41',\n        msie_mobile: '11'\n    },\n\n    // path to your html alerts\n    // could be a function:\n    // function (ua) {\n    //   return '/alerts/' + lang + '.html'\n    // }\n    path: '/alerts/en.html',\n    // if `false` then user's choice will be saved in the cookies\n    // and alert window will not be showen next time\n    ignoreChoice: false\n})\n```\n\nInstead of specifying *supported* property you can specify *unsupported* browsers:\n```js\nnew badbrowser({\n    unsupported: {\n        // the same as supported.chrome = '40'\n        chrome: '39',\n        // the same as supported.firefox = '34'\n        firefox: '33',\n        // will show alert for any mobile browser\n        mobile: true\n    }\n})\n```\n\nAlso you can get the flag that indicates compatibility of a current browser\n```js\nlet bb = new badbrowser({\n    unsupported: {\n        // the same as supported.chrome = '40'\n        chrome: '39',\n        // the same as supported.firefox = '34'\n        firefox: '33',\n        // will show alert for any mobile browser\n        mobile: true\n    }\n})\n\nlet isSupported = bb.check();\n```\nYou can manually control warning window: \\\nShows warning if it is not added yet and removes warning if it exists.\n```js\nbb.toggleWarning();\n```\n## Default settings object\n```js\n{\n  template: null,\n  path: false,\n  fullscreen: true,\n  ignoreChoice: false,\n  logo: false,\n  supported: {\n    chrome: '42',\n    chromium: '42',\n    firefox: '38',\n    msie: '9',\n    msedge: '12',\n    opera: '26',\n    safari: '6',\n    yandexbrowser: '15',\n    safari_mobile: '7',\n    android: '4',\n    mobile: true\n  }\n}\n```\n\n## Browser flags\n\n  * `chrome`\n  * `firefox`\n  * `msie`\n  * `msedge`\n  * `safari`\n  * `yandexbrowser`\n  * `android`\n  * `ios`\n  * `opera`\n  * `samsungBrowser`\n  * `phantom`\n  * `blackberry`\n  * `webos`\n  * `silk`\n  * `bada`\n  * `tizen`\n  * `seamonkey`\n  * `sailfish`\n  * `ucbrowser`\n  * `qupzilla`\n  * `vivaldi`\n  * `sleipnir`\n  * `kMeleon`\n\n# LICENSE\n[MIT License](./LICENSE) © [dvhb](https://dvhb.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvhb%2Fbadbrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvhb%2Fbadbrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvhb%2Fbadbrowser/lists"}