Skip to content

Commit

Permalink
typo fix and analytics changes from IA cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
rajbot committed Feb 17, 2015
1 parent 64284ca commit f4d0df4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
14 changes: 10 additions & 4 deletions BookReader/BookReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4150,7 +4150,7 @@ BookReader.prototype.bindMozTouchHandlers = function() {
})
.bind('MozTouchUp', function(event) {
//console.log('MozTouchUp - ' + event.originalEvent.streamId + ' ' + event.target + ' ' + event.clientX + ',' + event.clientY);
if (this.mode = this.constMode2up) {
if (this.mode == this.constMode2up) {
event.preventDefault();
}
});
Expand Down Expand Up @@ -4546,9 +4546,15 @@ BookReader.prototype.updateLocationHash = function() {
'itemid': this.bookId,
'cache_bust': Math.random()
}
var qs = archive_analytics.format_bug(values);
var error_img = new Image(100,25);
error_img.src = archive_analytics.img_src + "?" + qs;
// EEK! offsite embedding and /details/ page books look the same in analytics, otherwise!
values.offsite=1;
values.details=0;
try{
values.offsite=( window.top.location.hostname.match(/\.archive.org$/) ? 0 : 1);
values.details=(!values.offsite && window.top.location.pathname.match(/^\/details\//) ? 1 : 0);
} catch (e){} //avoids embed cross site exceptions -- but on (+) side, means it is and keeps marked offite!

archive_analytics.send_ping(values, null, 'augment_for_ao_site');
}
}

Expand Down
5 changes: 1 addition & 4 deletions BookReaderIA/datanode/BookReaderJSIA.php
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,7 @@ function BRFatal($string) {
values['referrer'] = document.referrer;
}

var qs = archive_analytics.format_bug(values);

var error_img = new Image(100,25);
error_img.src = archive_analytics.img_src + "?" + qs;
archive_analytics.send_ping(values);
}

alert("<? echo $string;?>");
Expand Down
5 changes: 1 addition & 4 deletions BookReaderIA/datanode/templates/logError.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ function logError(description,page,line) {
values['bookPath'] = br.bookPath;
}

var qs = archive_analytics.format_bug(values);

var error_img = new Image(100,25);
error_img.src = archive_analytics.img_src + "?" + qs;
archive_analytics.send_ping(values);
}

return false; // allow browser error handling so user sees there was a problem
Expand Down
2 changes: 1 addition & 1 deletion BookReaderIA/inc/BookReader.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class BookReader
// manually update with Launchpad version number at each checkin so that browsers
// do not use old cached version
// see https://bugs.launchpad.net/gnubook/+bug/330748
$version = "3.1.2";
$version = "3.1.4";

if (BookReader::getDevHost($server)) {
// On dev host - add time to force reload
Expand Down

0 comments on commit f4d0df4

Please sign in to comment.