can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r21839: LJRU-3137: js error on the external site...

Committer: dpetrov
LJRU-3137: js error on the external sites with lj frames inside
U   trunk/htdocs/js/livejournal.js
Modified: trunk/htdocs/js/livejournal.js
===================================================================
--- trunk/htdocs/js/livejournal.js	2012-04-27 14:03:46 UTC (rev 21838)
+++ trunk/htdocs/js/livejournal.js	2012-04-27 14:06:43 UTC (rev 21839)
@@ -30,6 +30,13 @@
 };
 
 LiveJournal.initPage = function () {
+	//LJRU-3137: The code relies on the Site global variable
+	//so it appears on all livejournal pages. If it's
+	//not there than we are on the external site.
+	if (!window.Site) {
+		return;
+	}
+
 	//register system hooks
 	LiveJournal.register_hook('update_wallet_balance', LiveJournal.updateWalletBalance);
 	LiveJournal.register_hook('xdr/message', LiveJournal.processXdr);

Tags: can3p, dpetrov, 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