update ipv4 & 6 block

This commit is contained in:
nccu 2014-11-13 17:38:44 +08:00
parent dd4c9fc587
commit 639c398e41
1 changed files with 28 additions and 5 deletions

View File

@ -2,11 +2,7 @@
// Init functions // Init functions
function init() { function init() {
utils = {
}
function heightCompare () { function heightCompare () {
var priHeight = $('.primary').height(); var priHeight = $('.primary').height();
var secHeight = $('.secondary').height(); var secHeight = $('.secondary').height();
@ -322,6 +318,33 @@ var newsBlock = function() {
} }
$(function() { $(function() {
if (getCookie("ipv6") == 'true') {
$("#ipv6").text("Now in IPv6");
} else {
$("#ipv6").text("Now in IPv4");
}
function getCookie(c_name) {
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1) {
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1) {
c_value = null;
} else {
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1) {
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start, c_end));
}
return c_value;
}
var _timer = 0; var _timer = 0;
var menuItem$ = $('.page_menu.level_1').children('li'); var menuItem$ = $('.page_menu.level_1').children('li');