Index: back_from_comment.js
===================================================================
--- back_from_comment.js	(revision 5088)
+++ back_from_comment.js	(working copy)
@@ -16,7 +16,7 @@
     attr=attr.substr(0,p);
   }
   attr+=attr.indexOf('?')==-1?'?':'&';
-  url=location.pathname.substring(1);
+  url=Drupal.settings['InsertNode'].url;
   jQuery(link).attr('href',attr+'destination='+url+anchor);
 }
 jQuery(document).ready(function() {
Index: InsertNode.module
===================================================================
--- InsertNode.module	(revision 5088)
+++ InsertNode.module	(working copy)
@@ -42,6 +42,12 @@
   if (function_exists('jquery_plugin_add')) {
     jquery_plugin_add('cookie');
   }
+  $settings = array(
+    'InsertNode' => array(
+      'url' => $_GET['q'],
+    ),
+  );
+  drupal_add_js($settings, 'setting');
   drupal_add_js(drupal_get_path('module', 'InsertNode') . '/back_from_comment.js');
 }
 
