Skip to content

Commit

Permalink
Delay loading piclens.js
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Mar 14, 2009
1 parent d516cc4 commit c38af06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion root/static/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<script language="JavaScript" type="text/javascript" src="/static/js/remedie.util.js"></script>
<script language="JavaScript" type="text/javascript" src="/static/js/remedie.js"></script>
<script language="JavaScript" type="text/javascript">var remedie; $( function(){ remedie = new Remedie() })</script>
<script language="JavaScript" type="text/javascript" src="http://lite.piclens.com/current/piclens.js"></script>
</head>
<body>
<div class="container">
Expand Down
10 changes: 9 additions & 1 deletion root/static/js/remedie.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ Remedie.prototype = {
channel_context_refresh: function(){ remedie.manuallyRefreshChannel(channel) },
channel_context_clear_stale: function(){ remedie.manuallyRefreshChannel(channel, true) },
channel_context_mark_watched: function(){ remedie.markAllAsWatched(channel, true) },
channel_context_cooliris: function(){ PicLensLite.start() },
channel_context_cooliris: function(){ remedie.launchCooliris() },
channel_context_cooliris_swf: function(){ remedie.embedCooliris(channel) },
channel_context_remove: function(){ remedie.removeChannel(channel) }
}
Expand Down Expand Up @@ -1552,6 +1552,14 @@ Remedie.prototype = {
}
},

launchCooliris: function() {
if (!window.PicLensLite) {
$.getScript("http://lite.piclens.com/current/piclens.js", function(){ PicLensLite.start() });
} else {
PicLensLite.start();
}
},

showAboutDialog: function() {
var message = $('<div/>').createAppend(
'div', { id: "about-dialog" }, [
Expand Down

0 comments on commit c38af06

Please sign in to comment.