Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on UmiJS

chencheng (云谦) sorrycc

🌻
Working on UmiJS
View GitHub Profile
@sorrycc
sorrycc / browserinfo.js
Created March 29, 2011 05:58
Two way to get browser type[ and version]
var getBrowserInfo = function() {
// Ref: http://www.useragentstring.com/pages/useragentstring.php
var token = [ // 顺序有关
"Opera", // 某些版本会伪装成 MSIE, Firefox
"Chrome", // 某些版本会伪装成 Safari
"Safari", // 某些版本会伪装成 Firefox
"MSIE 6",
"MSIE 7",
"MSIE 8",
"MSIE 9",
@sorrycc
sorrycc / CSS Overflow Test Script
Created February 27, 2011 08:10
CSS Overflow Test Script
/**
* CSS Overflow Test Script
* @author [email protected], @chenchengpro
* @doc http://www.chencheng.org/
*/
(function() {
// Text