{"id":27608327,"url":"https://github.com/devon3818/browser.js","last_synced_at":"2025-04-22T22:33:45.479Z","repository":{"id":35412267,"uuid":"39677007","full_name":"Devon3818/browser.js","owner":"Devon3818","description":"判断浏览器和内核的工具（Determine the browser and the kernel of the tool）","archived":false,"fork":false,"pushed_at":"2015-07-25T09:55:57.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-02T16:46:02.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Devon3818.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-07-25T07:47:15.000Z","updated_at":"2017-06-07T07:37:24.000Z","dependencies_parsed_at":"2022-09-17T04:10:19.913Z","dependency_job_id":null,"html_url":"https://github.com/Devon3818/browser.js","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devon3818%2Fbrowser.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devon3818%2Fbrowser.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devon3818%2Fbrowser.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devon3818%2Fbrowser.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devon3818","download_url":"https://codeload.github.com/Devon3818/browser.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250334094,"owners_count":21413507,"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":"2025-04-22T22:32:11.955Z","updated_at":"2025-04-22T22:33:45.467Z","avatar_url":"https://github.com/Devon3818.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# browser.js\n判断浏览器和内核的工具（Determine the browser and the kernel of the tool）\nDate: 2015-07-25\n\n首先引入browser.js 返回 client 对象：\n\n\nclient 对象下有两个对象：engine 和 browser，如下：\n\n\n    //呈现引擎\n\tvar engine = {\n\t\t\n\t\tie:0,\n\t\tgecko:0,\n\t\twebkit:0,\n\t\tkhtml:0,\n\t\topera:0,\n\t\t\n\t\t//完整的版本号\n\t\tver:null\n\t\t\n\t};\n\t\n\t//浏览器\n\tvar browser = {\n\t\n\t\t//主要浏览器\n\t\tie:0,\n\t\tfirefox:0,\n\t\tsafari:0,\n\t\tkonq:0,\n\t\topera:0,\n\t\tchrome:0,\n\t\t\n\t\t//具体版本号\n\t\tver:null\n\t\t\n\t};\n\t\n\t可以返回如：\n\tclient.engine.webkit（返回webkit内核版本号）\n\tclient.browser.chrome（返回chrome版本号）\n\t\n\t/---------便利函数调用---------/\n\t\n\nisIE();      //判断是否为IE，返回版本号\n\nisFF();      //判断是否为firebox，返回版本号\n\nisCho();     //判断是否为chrome，返回版本号\n\nisO();       //判断是否为opera，返回版本号\n\nisS();       //判断是否为safari，返回版本号\n\n/*判断浏览器内核*/\n\nisMS();     //返回IE内核版本\n\nisGecko();  //返回Gecko内核版本\n\nisWebkit(); //返回webkit内核版本\n\nisKhtml();  //返回khtm内核版本号\n\nisOpear();  //返回opera内核版本号\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevon3818%2Fbrowser.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevon3818%2Fbrowser.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevon3818%2Fbrowser.js/lists"}