Showing
2 changed files
with
4 additions
and
16 deletions
@@ -24,23 +24,11 @@ var $body = $('body'); | @@ -24,23 +24,11 @@ var $body = $('body'); | ||
24 | 24 | ||
25 | require("js/footer"); | 25 | require("js/footer"); |
26 | 26 | ||
27 | - | ||
28 | - | ||
29 | function cookie(name) { | 27 | function cookie(name) { |
30 | - var cookies = document.cookie, | ||
31 | - cookieVal, | ||
32 | - offset; | ||
33 | - | ||
34 | - if (document.cookie && document.cookie !== '') { | ||
35 | - offset = cookies.indexOf(name + '='); | ||
36 | - if (offset > -1) { | ||
37 | - offset += name.length + 1; | ||
38 | - | ||
39 | - cookieVal = decodeURIComponent($.trim(cookies.substring(offset, cookies.indexOf(';', offset)))); | ||
40 | - } | ||
41 | - } | 28 | + var re = new RegExp(name + '=([^;$]*)', 'i'), |
29 | + matchPattern = '$1'; | ||
42 | 30 | ||
43 | - return cookieVal; | 31 | + return re.test(decodeURIComponent(document.cookie)) ? RegExp[matchPattern] : ''; |
44 | } | 32 | } |
45 | 33 | ||
46 | function setCookie(name, value, options) { | 34 | function setCookie(name, value, options) { |
@@ -1159,7 +1147,7 @@ function actionTipPic() { | @@ -1159,7 +1147,7 @@ function actionTipPic() { | ||
1159 | } | 1147 | } |
1160 | } | 1148 | } |
1161 | }); | 1149 | }); |
1162 | - logolink = $('.first-nav-list .cur').find('a').attr('href'); | 1150 | + logolink = $('.first-nav-item .cure').find('.name-cn').find('a').attr('href'); |
1163 | $('.main-link').attr('href', logolink); | 1151 | $('.main-link').attr('href', logolink); |
1164 | } | 1152 | } |
1165 | 1153 |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment