1var go_id = 0; 2var go_url = ''; 3var go_arr = new Array(); 4 5switch (location.host) { 6 case "comment.fengniao.com": 7 if (/\/71\/(\d+)\.html/.test(location.pathname)) { 8 go_id = location.pathname.match(/\d+\.html/); 9 go_url = 'https://m.fengniao.com/comment/' + go_id; 10 } 11 if (/\/71\/(\d+)_\d+\.html/.test(location.pathname)) { 12 str = location.pathname.match(/\d+_\d+/); 13 str = str.toString(); 14 go_arr = str.split("_"); 15 go_url = 'https://m.fengniao.com/comment/' + go_arr[0] + '.html'; 16 } 17 break; 18 case "bbs.fengniao.com": 19 if (location.pathname == '/') { 20 go_url = 'https://m.fengniao.com/bbs/'; 21 } 22 //å¸å页 23 if (/\/(\d+)\.html/.test(location.pathname)) { 24 go_id = location.pathname.match(/\d+\.html/); 25 if (go_id) { 26 go_url = 'https://m.fengniao.com/thread/' + go_id; 27 } 28 } 29 if (/\/(\d+)_\d+\.html/.test(location.pathname)) { 30 str = location.pathname.match(/\d+_\d+/); 31 if (str) { 32 go_arr = str.toString().split("_"); 33 go_url = 'https://m.fengniao.com/thread/' + go_arr[0] + '_' + go_arr[1] + '.html'; 34 } 35 } 36 if (/\/(\d+)_\d+_\d+\.html/.test(location.pathname)) { 37 str = location.pathname.match(/\d+_\d+_\d+/); 38 if (str) { 39 go_arr = str.toString().split("_"); 40 go_url = 'https://m.fengniao.com/thread/' + go_arr[1] + '/' + go_arr[0] + '_' + go_arr[2] + '.html'; 41 } 42 } 43 //çåå表页 44 if (/\/forum_(\d+)\.html/.test(location.pathname)) { 45 go_id = location.pathname.match(/\d+/); 46 go_url = 'https://m.fengniao.com/forum_' + go_id + '/'; 47 } 48 //å ¨é¨æ¿åå表页 49 if (location.pathname == '/forum/') { 50 go_url = 'https://m.fengniao.com/bbs/'; 51 } 52 //ç²¾å 53 if (/\/jinghua-(\d+)\.html/.test(location.pathname)) { 54 go_id = location.pathname.match(/\d+/); 55 if (go_id == 1) { 56 go_id = 101; 57 } 58 go_url = 'https://m.fengniao.com/forum_' + go_id + '/'; 59 } 60 //å¸åçå¾é¡µ 61 if (/\/forum\/pic\/slide_(\d+)_(\d+)_(\d+).html/.test(location.pathname)) { 62 str = location.pathname.match(/\d+_\d+_\d+/); 63 str = str.toString(); 64 go_arr = str.split("_"); 65 go_url = 'https://m.fengniao.com/forum/slide_' + go_arr[1] + '.html'; 66 } 67 break; 68 case "tu.fengniao.com": 69 if (/\/(\d+)\//.test(location.pathname) || /\/thread_(\d+)\.html/.test(location.pathname)) { 70 go_id = location.pathname.match(/\d+/); 71 go_id = go_id.toString(); 72 go_url = 'https://m.fengniao.com/image_' + go_id + '/'; 73 } 74 break; 75 case "photo.fengniao.com": 76 go_url = 'https://m.fengniao.com/photo/'; 77 if (/\/f_(\d+)\.html/.test(location.pathname) || /\/f_(\d+)_(\d+)_(\d+)\.html/.test(location.pathname)) { 78 str = location.pathname.match(/\d+/); 79 str = str.toString(); 80 go_arr = str.split("_"); 81 go_url = 'https://m.fengniao.com/photo/f_' + go_arr[0] + '.html'; 82 } 83 break; 84 case "www.fengniao.com": 85 //èé¸é¦é¡µ 86 if (location.pathname == '/') { 87 go_url = 'https://m.fengniao.com/'; 88 } 89 90 //PEå表页 /pe/ 91 if (/^\/pe\/$/.test(location.pathname)) { 92 go_url = 'https://m.fengniao.com/pe/'; 93 } 94 95 //ç¸æºæ°å /pe/camera.html 96 if (/^\/pe\/list_camera\.html$/.test(location.pathname)) { 97 go_url = 'https://m.fengniao.com/product/list_114.html'; 98 } 99 100 //é头æ°å /pe/lens.html 101 if (/^\/pe\/list_lens\.html$/.test(location.pathname)) { 102 go_url = 'https://m.fengniao.com/product/list_118.html'; 103 } 104 105 //卿页 /pe/278779/ 106 if (/^\/pe\/(\d+)\/$/.test(location.pathname)) { 107 var str = location.pathname; 108 str = str.toString(); 109 go_arr = str.split("/"); 110 go_id = go_arr[2]; 111 go_url = 'https://m.fengniao.com/p' + go_id + '/index.html'; 112 } 113 114 //å个tag页 è¿ä¸ªå¿ é¡»å¨åé¢ /zhuanti/haokandetupian_42943/ 115 if (/^\/zhuanti\/[a-z]+_(\d+)\//.test(location.pathname)) { 116 go_id = location.pathname.match(/\d+/); 117 go_url = 'https://m.fengniao.com/tag/' + go_id + '.html'; 118 } 119 120 //tagå表页 /zhuanti/TagList_0_1.html 121 if (/^\/zhuanti\/\TagList_\d_\d+.html$/.test(location.pathname)) { 122 go_id = location.pathname.match(/\d/); 123 go_url = 'https://m.fengniao.com/tag/list_' + go_id + '.html'; 124 } 125 break; 126 case "news.fengniao.com": 127 case "qicai.fengniao.com": 128 case "image.fengniao.com": 129 case "academy.fengniao.com": 130 case "travel.fengniao.com": 131 case "auto.fengniao.com": 132 case "qsy.fengniao.com": 133 case "jjb.fengniao.com": 134 case "info.fengniao.com": 135 case "sai.fengniao.com": 136 case "video.fengniao.com": 137 case "8k.fengniao.com": 138 //case "preview.cms.fengniao.com": 139 //é¢éé¦é¡µ 140 if (location.pathname == '/') { 141 go_arr = location.host.split("."); 142 go_url = 'https://m.fengniao.com/' + go_arr[0] + '/'; 143 } 144 145 //é¢éäºçº§å表页 146 if (/list_\d+.html/.test(location.pathname)) { 147 go_id = location.pathname.match(/\d+/); 148 go_url = 'https://m.fengniao.com/class_' + go_id + '/'; 149 } 150 151 //æç« 页 152 if (/\d+\/\d+\.html/.test(location.pathname)) { 153 go_id = location.pathname.match(/\d+\.html/); 154 go_url = 'https://m.fengniao.com/document/' + go_id; 155 } 156 if (/\d+\/\d+_\d+\.html/.test(location.pathname)) { 157 str = location.pathname.match(/\d+_\d+/); 158 str = str.toString(); 159 go_arr = str.split("_"); 160 go_url = 'https://m.fengniao.com/document/' + go_arr[0] + '.html'; 161 } 162 if (/\d+\/\d+_all\.html/.test(location.pathname)) { 163 go_id = location.pathname.match(/\d+_all\.html/); 164 go_id = go_id.toString(); 165 go_arr = go_id.split("_"); 166 go_url = 'https://m.fengniao.com/document/' + go_arr[0] + '.html'; 167 } 168 169 //ç»å¾æç« çwapéé 170 if (/\/slide\/\d+\/\d+_1\.html/.test(location.pathname)) { 171 go_id = location.pathname.match(/\d+_1\.html/); 172 go_id = go_id.toString(); 173 go_arr = go_id.split("_"); 174 go_url = 'https://m.fengniao.com/slide/' + go_arr[0] + '.html'; 175 } 176 //è§é¢æç« 页 177 if (/\/video\/\d+\.html/.test(location.pathname)) { 178 go_id = location.pathname.match(/\d+\.html/); 179 go_url = 'https://m.fengniao.com/video/' + go_id; 180 } 181 break; 182 case "sgq.fengniao.com": // åå åé¦é¡µ 183 go_url = 'https://m.fengniao.com/'; 184 break; 185 case "my.fengniao.com": // 个人ä¸å¿ 186 // ç»å½é¡µéé 187 if (/\/login\.php/.test(location.pathname)) { 188 go_url = 'https://m.fengniao.com/login' + location.search; 189 } 190 // æçè¯¾ç¨ 191 if (/\/course\.php/.test(location.pathname)) { 192 go_url = 'https://m.fengniao.com/wkt/myCourse'; 193 } 194 break; 195 case "wkt.fengniao.com": 196 if (location.pathname == '/') { 197 go_url = 'https://m.fengniao.com/wkt'; 198 } 199 if (/\/detail_\d+\.html/.test(location.pathname)) { 200 go_id = location.pathname.match(/\d+/g); 201 go_url = 'https://m.fengniao.com/wkt/detail_' + go_id + '.html'; 202 } 203 if (/\/detail_\d+_\d+.html/.test(location.pathname)) { 204 go_id = location.pathname.match(/\d+/g); 205 go_id = go_id.toString(); 206 go_arr = go_id.split(","); 207 go_url = 'https://m.fengniao.com/wkt/detail_' + go_arr[0] + '.html'; 208 } 209 if (/\/course_\d+\.html/.test(location.pathname)) { 210 go_id = location.pathname.match(/\d+/g); 211 go_url = 'https://m.fengniao.com/wkt/course_' + go_id + '.html'; 212 } 213 if (/\/list_?\d*_?\d*.html/.test(location.pathname)) { 214 go_id = location.pathname.match(/\d+/g); 215 if (go_id == null) { 216 go_url = 'https://m.fengniao.com/wkt'; 217 } else { 218 var _class = 0; 219 var _freeType = 0; 220 go_id = go_id.toString(); 221 go_arr = go_id.split(","); 222 if (typeof (go_arr[0]) != "undefined") { 223 _class = go_arr[0]; 224 } 225 if (typeof (go_arr[1]) != "undefined") { 226 _freeType = go_arr[1]; 227 } 228 go_url = 'https://m.fengniao.com/wkt/list_' + _class + '_' + _freeType + '.html'; 229 } 230 } 231 break; 232 case "live.fengniao.com"://ç´æ 233 if (/pc\/\d+/.test(location.pathname)) { 234 go_id = location.pathname.match(/\d+/); 235 go_url = 'https://live.fengniao.com/h5/' + go_id; 236 } 237 break; 238 default: 239 // go_url = 'https://m.fengniao.com/'; 240} 241 242if (go_url) {
243 if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/i.test(navigator.userAgent))) { 244 if (document.cookie.indexOf("showpc=1") < 0) { 245 try { 246 if (/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { 247 window.location.href = go_url; 248 } else if (/iPad/i.test(navigator.userAgent)) { 249 } else { 250 window.location.href = go_url; 251 } 252 } catch (e) { 253 } 254 } 255 } 256}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.