-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Since I had only one test case, no guarantees on what happens when someone else posts another twitter picture.)
- Loading branch information
1 parent
7b6d899
commit 269c79c
Showing
4 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var imgURL = '/img.json'; | ||
|
||
function getImg() { | ||
tweetfeed = $("#tweet_feed").html(); | ||
match = tweetfeed.match(/pic\.twitter([^<]+)/); | ||
if (match == null) { | ||
$("#imgpanel").slideUp("slow"); | ||
return; | ||
} | ||
imgurl = 'http://' + match[0]; | ||
$.getJSON(imgURL + '?imgurl=' + encodeURIComponent(imgurl), function(data) { | ||
if (jQuery.isEmptyObject(data)) { | ||
$("#imgpanel").slideUp("slow"); | ||
return; | ||
} | ||
|
||
$("#imgpanel").slideDown("slow"); | ||
$("#img").html("<img src='" + data.imgurl + "' alt='Image Not Found'/>"); | ||
}); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters