Fix an assumption in the ad check to handle AdBlock for Chrome.

This fixes the bug where the submit page initializes unsuccessfully,
causing link posts to be accidentally submitted as text posts.
This commit is contained in:
Max Goodman
2011-06-29 19:28:48 -07:00
parent 9fc8e5ec92
commit f9067c07f5

View File

@@ -37,7 +37,7 @@
%>
$(function() {
var ad = $("#ad-frame");
if(ad.height() == 0 || ad.width() == 0 || ad.offset().left == 0) {
if(!ad.length || ad.height() == 0 || ad.width() == 0 || ad.offset().left == 0) {
$(".footer").append("<img alt='' src='${unsafe(tracker_url)}&random=" +
Math.random()*10000000000000000 + "'/>");
}