Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r19211: LJSUP-8952 (<lj like> tag)

Committer: ailyin
LJSUP-8952 (<lj like> tag)
U   trunk/cgi-bin/LJ/Hooks/LJLike.pm
Modified: trunk/cgi-bin/LJ/Hooks/LJLike.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/LJLike.pm	2011-06-03 01:30:20 UTC (rev 19210)
+++ trunk/cgi-bin/LJ/Hooks/LJLike.pm	2011-06-03 01:35:13 UTC (rev 19211)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-LJ::register_hook( 'sitewide_resources' => sub {
+LJ::register_hook( 'insert_html_after_body_open' => sub {
     return if $LJ::REQ_GLOBAL{'sitewide_resources_ljlike_google'}++;
 
     my $language = LJ::Lang::get_remote_lang();
@@ -10,7 +10,7 @@
     my $locale = LJ::lang_to_locale($language);
     $locale =~ s/_.*//g;
 
-    LJ::include_raw( 'html' => qq{<script type="text/javascript" src="http://apis.google.com/js/plusone.js">{lang: $locale}</script>} );
+    $$after_body_open_ref .=  qq{<script type="text/javascript" src="http://apis.google.com/js/plusone.js">{lang: '$locale'}</script>};
 } );
 
 LJ::register_hook( 'insert_html_after_body_open' => sub {

Tags: andy, livejournal, pm
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