Permalink
Browse files

Fix for thumbnail bug

  • Loading branch information...
Sereri
Sereri committed Jan 13, 2012
1 parent c2ecf09 commit 80371936dded16bed9a1524af97e13f0128c8a12
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/com/ferg/awful/thread/AwfulPost.java
@@ -399,8 +399,11 @@ public void markLastRead() {
img.setAttribute("href", src);
TagNode newimg = new TagNode("img");
if(!prefs.imgurThumbnails.equals("d") && src.contains("i.imgur.com")){
+ int lastSlash = src.lastIndexOf('/');
+ if(src.length()-lastSlash<=9){
int pos = src.length() - 4;
- src = src.substring(0, pos) + prefs.imgurThumbnails + src.substring(pos);
+ src = src.substring(0, pos) + prefs.imgurThumbnails + src.substring(pos);
+ }
}
newimg.setAttribute("src", src);
img.addChild(newimg);

0 comments on commit 8037193

Please sign in to comment.