diff --git a/assets/script.js b/assets/script.js index ef97276..c7a09c9 100644 --- a/assets/script.js +++ b/assets/script.js @@ -31,7 +31,7 @@ jQuery(function ($) { if ($('#nav.empty').length) { // Fetch site nav from remove JSON api $.getJSON( - 'http://coscup.org/2011/api/menu/?callback=?', + '/2011/api/menu.json', function (data) { var $nav = $('#nav').removeClass('empty'); $nav.html(data[lang].replace(/href="(\/[^\/])/g, 'href="http://coscup.org$1')); @@ -192,7 +192,7 @@ jQuery(function ($) { if ($('#sidebar > .sponsors.empty').length) { // Fetch sponsors from remove JSON api $.getJSON( - 'http://coscup.org/2011/api/sponsors/?callback=?', + '/2011/api/sponsors.json', function (data) { var $sponsors = $('#sidebar > .sponsors').removeClass('empty'); var titles = ( @@ -410,6 +410,7 @@ jQuery(function ($) { } } + /* if ($('#sidebar2 > .socialbuzz').length) { var plurks, twits; $.getJSON( @@ -427,7 +428,9 @@ jQuery(function ($) { } ); } + */ + /* if ($('#ipv6block').length) { if (window.location.hostname === 'ipv6.coscup.org') { if (window._gaq) _gaq.push(['_trackEvent', 'IPv6 2011', 'connected']); @@ -438,7 +441,7 @@ jQuery(function ($) { } else { $.getJSON( // See http://ipv6-test.com/api/ - 'http://v6.ipv6-test.com/api/myip.php?json&callback=?', + 'https://v6.ipv6-test.com/api/myip.php?json&callback=?', function (data) { if (window._gaq) _gaq.push(['_trackEvent', 'IPv6 2011', 'ready but not connected']); $('#ipv6block').addClass('show').append( @@ -449,6 +452,7 @@ jQuery(function ($) { ); } } + */ if ($('#countdown-time').length) { ctTimer = setInterval( @@ -975,7 +979,7 @@ jQuery(function ($) { !/((blog|sponsor|register)\.)?coscup\.org\.?/.test(window.location.domain) ) { $.getJSON( - 'http://coscup.org/2011/api/program/?callback=?', + '/2011/api/program.json', function (data) { programs = data; insertProgramInfo(); diff --git a/assets/script.min.js b/assets/script.min.js index a6e549d..85d4c9f 100644 --- a/assets/script.min.js +++ b/assets/script.min.js @@ -1,30 +1 @@ -jQuery(function(a){function k(){return!a("#title:visible").length}function q(){var b=[];a("#mobileSponsorLogo").remove();a.each({diamond:10,gold:5,silver:2,bronze:1},function(d,g){a("#sidebar > .sponsors ."+d+" a").each(function(){for(var a=g;a--;)b.push(this)})});b.length!==0&&a("#nav").after(a('
').append(a(b[Math.floor(b.length*Math.random())]).clone()))}function r(){a("#sidebar2 > .images").imageTile({num:12,photos:yuren_54,beforeImageLoad:function(a){a.css("opacity", -0)},imageLoad:function(a){a.css("opacity",1)}})}function t(b,d){var g=a("You are currently using IPv6 connection.
")): -a.getJSON("http://v6.ipv6-test.com/api/myip.php?json&callback=?",function(){window._gaq&&_gaq.push(["_trackEvent","IPv6 2011","ready but not connected"]);a("#ipv6block").addClass("show").append('Your network is IPv6 ready. Try it now by connect to ipv6.coscup.org.
')}));a("#countdown-time").length&&(m=setInterval(v,1E3),a(window).bind("pageload",function(b){clearTimeout(m);a(window).unbind(b)}),v(),a("#countdown").addClass("show"))} -function B(){a(".hideInMobile iframe").each(function(){a(this).attr("data-src",this.src);this.src=""})}function C(){a("#sidebar2 iframe").each(function(){if(a(this).attr("data-src"))this.src=a(this).attr("data-src")})}function w(){a(window).trigger("pageload");a("#header").css("background-position","center -"+(75*Math.floor(Math.random()*4)).toString(10)+"px");a("#footer").css("background-position","center -"+(75*Math.floor(Math.random()*6)).toString(10)+"px");k()?(window._gaq&&_gaq.push(["_trackEvent", -"Mobile 2011",window.location.href]),a(window).bind("resize.defer",function(){k()||(a(this).unbind("resize.defer"),u(),C())}),B()):(u(),window.history&&history.pushState&&a("a").each(function(){this.hostname!==window.location.hostname||!/2011/.test(this.pathname)||!RegExp(h).test(this.pathname.toLowerCase())||this.href===window.location.href||i[this.href]||i[this.href]==="fetching"||/nocache/.test(this.getAttribute("rel"))||(l.push(this.href),i[this.href]="fetching",l.length===1&&x())}))}function y(b, -d,g){a(window).unbind("resize.defer");n&&n.abort();if(!d&&i[b]&&i[b]!=="fetching")g&&a(window).scrollTop(0),z(i[b]);else{var e=a("#content").addClass("loading");n=a.ajax({url:b,dataType:"html",cache:!d,complete:function(f,c){c==="success"||c==="notmodified"?(e.removeClass("loading"),i[b]=f.responseText,g&&a(window).scrollTop(0),z(f.responseText)):window.location.replace(b)}})}}function z(b){var d=a("").append(b.match(//)[0].replace(/