can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r18776: LJSUP-8467: Do not download files for pr...

Committer: dpetrov
LJSUP-8467: Do not download files for preloading
U   trunk/htdocs/js/share.js
Modified: trunk/htdocs/js/share.js
===================================================================
--- trunk/htdocs/js/share.js	2011-04-04 03:16:43 UTC (rev 18775)
+++ trunk/htdocs/js/share.js	2011-04-04 03:32:23 UTC (rev 18776)
@@ -27,13 +27,14 @@
 * LJShare.entry( { url: "http://some.url.com/", title: "Post title", description: "Post description" } )
 *		.attach( '#link_selector', 'service_name' )
 *		.attach( jQuery( '#another_selector' ), 'service_name2' ) //we can pass nodes or jquery collections
-*		.link( '#selector', [ "twtter", "vkontakte", "moimir"] ); //also we can attach popup
+*		.link( '#selector', [ "twitter", "vkontakte", "moimir"] ); //also we can attach popup
 * 
 */
 
 function preload( srcArr ) {
-	for( var i = srcArr.length; --i;
-		( new Image() ).src = Site.imgprefix + srcArr[ i ] + '?v=1' );
+	for( var i = 0; i < srcArr.length; ++i ) {
+		( new Image() ).src = Site.imgprefix + srcArr[ i ] + '?v=1';
+	}
 }
 
 function prepareOptions( opts ) {

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments