Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[ljcom] r9964: LJINT-365: crossdomain fixes and more

Committer: szhirkov
LJINT-365: crossdomain fixes and more
A   trunk/htdocs/js/partners/xdreceiver.js
Added: trunk/htdocs/js/partners/xdreceiver.js
===================================================================
--- trunk/htdocs/js/partners/xdreceiver.js	                        (rev 0)
+++ trunk/htdocs/js/partners/xdreceiver.js	2011-01-28 10:00:02 UTC (rev 9964)
@@ -0,0 +1,19 @@
+var search = location.search.replace('?','').split("&"),
+vars = { replyto: null, comment_id: null, mode: 'add_comment' };
+
+for( var i = 0 ; i < search.length; ++i ) {
+	var arr = search[ i ].split('=');
+	if( arr[0] in vars ) {
+		vars[ arr[0] ] = arr[ 1 ];
+	}
+}
+
+if( vars.mode == 'check' || vars.mode == 'check_domain' ) {
+	try {
+		var tryCheck = !!(window.top.location.href);
+	} catch (e) {
+		window.location.href = 'about:blank';
+	}
+} else {
+	window.top.LJAddComment( vars );
+}
\ No newline at end of file

Tags: aralot, js, ljcom
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