Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Additional check for valid image torrents.

You can also add Opera 11+ to compatible browsers.
  • Loading branch information...
commit dce12aa2c5e6534b7cde587cce05a245dfa6fd23 1 parent 4976573
@Dither Dither authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 public/javascripts/hidim_reader.js
View
7 public/javascripts/hidim_reader.js
@@ -40,8 +40,9 @@ var HidimReader = {
var images = document.getElementsByTagName('img');
- for(var i = 0; i < images.length; i++) {
- var image = images[i];
+ for(var image, i = 0; i < images.length; i++) {
+ image = images[i];
+ if (image.height != 32) continue; // that should do the trick.
image.addEventListener('click', this.addInfo, false);
image.addEventListener('mouseover', function() {this.style.cursor = "pointer";}, false);
}
@@ -55,7 +56,7 @@ var HidimReader = {
document.body.removeChild(document.getElementById(a.sha1));
return false;
}
- var data = "data:application/x-bittorrent;base64,"+Base64.encode(a.file.data);
+ var data = "data:application/x-bittorrent;base64,"+Base64.encode(a.file.data); // why not window.btoa(a.file.data)?
var infoButton = document.createElement('div');
infoButton.style.backgroundColor = "#000000";
Please sign in to comment.
Something went wrong with that request. Please try again.