diff --git a/capsule-prototype/index.html b/capsule-prototype/index.html
index eb41085d8407578af0a8dd9c7f4c025a7da5bc58..970c40a6e842dba94ffe84bbd4762822f6586152 100644
--- a/capsule-prototype/index.html
+++ b/capsule-prototype/index.html
@@ -41,7 +41,6 @@
 
 	<script language="javascript" type='text/javascript' src='../shared/js/iannix.js'></script>
 	<script language="javascript" type='text/javascript' src='../shared/js/online-script.js'></script>
-	<script type="module" src="../shared/php/rekallApp.js.php"></script>
 
 	<script language="javascript" type='text/javascript' src="../shared/js/libs/video-js/video.min.js"></script>
 	<link        rel="stylesheet" type="text/css"       href="../shared/js/libs/video-js/video-js.min.css" />
@@ -84,7 +83,7 @@
              <input class="popupFormButton" id="popupFormButtonUpload" type="submit" value="Upload" name="submit">
          </div>
      </div>     -->
-	<a class="displayMode" id="watermarkBox" href="javascript:window.app.rekall.Rekall('openUrl', window.app.urls.memberHome)" title="Open in MemoRekall" target="_parent"><img id="watermark" src="../shared/css/images/watermark.png" /></a>
+	<a class="displayMode" id="watermarkBox" href="javascript:window.app.rekall.Rekall('openUrl', 'home')" title="Open in MemoRekall" target="_parent"><img id="watermark" src="../shared/css/images/watermark.png" /></a>
 	<!--<a class="displayMode" id="openFullScreenBox" href="http://www.memorekall.fr" alt="Open in MemoRekall" target="_blank"><img id="openFullScreen" src="../shared/css/images/expand.png" /></a>-->
 	<div class="displayMode" id="projectInfoBtn" title="Project informations">i</div>
 	<div id="popupAlertSpace">
@@ -205,7 +204,7 @@
 
 	<div id='left_menu' class='flex-col editmode'>
 		<div class='top'>
-			<a class="left_menu_item dropable" href="javascript:window.app.rekall.Rekall('openUrl', window.app.urls.memberHome)">
+			<a class="left_menu_item dropable" href="javascript:window.app.rekall.Rekall('openUrl', 'home')">
 				<i class="fas fa-home fa-3x left_menu_item_icn"></i>
 				<p>Go back to my capsules</p>
 			</a>
diff --git a/capsule-prototype/js/online-rekall/RekallApplication.js b/capsule-prototype/js/online-rekall/RekallApplication.js
index e8097663b7d4946f56da8b48cfed0241fcf37062..135f3733138a2d544be99be304c398d5e55a09a7 100644
--- a/capsule-prototype/js/online-rekall/RekallApplication.js
+++ b/capsule-prototype/js/online-rekall/RekallApplication.js
@@ -6,12 +6,24 @@
             'init',
             'setPlaybackRate',
             'videoPlayer',
-            'rekall'
+            'rekall',
+            'getUrl'
         ];
 
         let localOptions = {};
 
         const OPTIONS = {
+            getUrl: function (){
+                if (arguments && localOptions.links && localOptions.links[arguments[0]]) {
+                    return localOptions.links[arguments[0]];
+                }
+                return '';
+            },
+            init: function (opts) {
+                if (opts) {
+                    $.extend(localOptions, opts);
+                }
+            },
             openUrl: function () {
                 if (!arguments)
                     return;
@@ -24,10 +36,8 @@
             pubSub: function () {
                 return localOptions.PubSub;
             },
-            init: function (opts) {
-                if (opts) {
-                    $.extend(localOptions, opts);
-                }
+            rekall: function () {
+            return localOptions.Rekall;
             },
             setPlaybackRate: function () {
                 if (arguments.length > 0 && 'number' === typeof arguments[0] && 0 < arguments[0] && arguments[0] < 10) {
@@ -40,9 +50,6 @@
                 }
 
                 return localOptions._videoPlayer;
-            },
-            rekall: function () {
-                return localOptions.Rekall;
             }
         };
 
@@ -60,5 +67,5 @@
             }
         }
     }
-    app.rekall = new RekallApplication()
+    app.rekall = new RekallApplication();
 })(window.app = window.app || {})
\ No newline at end of file
diff --git a/capsule-prototype/js/online-script.js b/capsule-prototype/js/online-script.js
index 5a1a1ac2dbdaf3627c543e3169454a607ed7a3cb..8f53cf8fa0bc0660838410e9cefe4471bdcc590f 100644
--- a/capsule-prototype/js/online-script.js
+++ b/capsule-prototype/js/online-script.js
@@ -19,7 +19,6 @@ $(document).ready(function() {
 	});
 	window.app.rekall.Rekall().allowProjectDeletion(window.app.Settings.Project.ProjectDeletionEnabled);
 
-	rekall.allowProjectDeletion(window.app.Settings.Project.ProjectDeletionEnabled)
 	Utils.actionPrefix = "php/";
 	Utils.actionSuffix = ".php?r=";
 
@@ -41,8 +40,6 @@ $(document).ready(function() {
 			rekall_common = infos;
 			if(getParameterByName("w") != "")
 				rekall_common.owner.canEdit = false;
-//
-//rekall_common.owner.canEdit = true;		
 
 			if(rekall_common.owner.canEdit) {
 				//Mode preview or not
@@ -310,8 +307,7 @@ function setEditionControls() {
 
 	$("#left_menu_item_preview").click(function(event){
 		event.stopPropagation();
-		window.open(window.app.urls.memberHome + 'capsule/preview/' + window.location.pathname.replace('/legacy/', '').slice(0, -1), '_blank');
-		/*window.open("?w=1", "Preview Rekall", "menubar=no, status=no, scrollbars=no, menubar=no, width=1150, height=560");  */
+		window.open(window.app.rekall.Rekall('getUrl', 'projectPreview'), '_blank');
 	});
 
 	$("#popupSettingsBtnDownloadXml").click(function(event){
@@ -558,7 +554,7 @@ function setEditionControls() {
 			setMetaFromDom(keyDoc, "Rekall->Highlight", "true");
 			var tmpColor = $("#popupNom").css("color");
 			$(this).attr("isHighlight", "true").addClass("selected");
-			$("#popupEdit").addClass("highlightPopup"); 
+			$("#popupEdit").addClass("highlightPopup");
 		}
 	});
 
@@ -1086,7 +1082,7 @@ function removeProject() {
 		data: {"remove": 1},
 		success: function(retour) {
 			rouletteEnd();
-			window.app.rekall.Rekall('openUrl', window.app.urls.memberHome);
+			window.app.rekall.Rekall('openUrl', 'home');
 		},
 		error: function() {
 			openAlert("Server error. Try again.");
diff --git a/src/Controller/CapsuleController.php b/src/Controller/CapsuleController.php
index 894664f804cd3b9089b06a219d4b0a0b0e886f9c..cb9eecf490e83eb68ec4947e64c2177561f075e6 100755
--- a/src/Controller/CapsuleController.php
+++ b/src/Controller/CapsuleController.php
@@ -20,6 +20,7 @@ use Symfony\Component\Form\FormInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\Routing\Annotation\Route;
+use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Symfony\Component\Uid\Uuid;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 use Symfony\Contracts\Translation\TranslatorInterface;
@@ -132,7 +133,7 @@ class CapsuleController extends AbstractController
     }
 
     #[Route('/{_locale<%app.supported_locales%>}/capsule/preview/{path}', name:'preview_capsule')]
-    public function preview(string $path): Response
+    public function preview(string $path, UrlGeneratorInterface $urlGenerator): Response
     {
         $file_path = '../legacy/' . $path;
         if (!file_exists($file_path)) {
@@ -143,12 +144,15 @@ class CapsuleController extends AbstractController
 
         return $this->render(
             'project/project_view.html.twig',
-            [ 'url' => $url ]
+            [
+                'url' => $url,
+                'linkHome' => $urlGenerator->generate('home', [], UrlGeneratorInterface::ABSOLUTE_URL)
+            ]
         );
     }
 
     #[Route('/{_locale<%app.supported_locales%>}/capsule/edit/{path}', name:'edit_capsule')]
-    public function edit(string $path): Response
+    public function edit(string $path, UrlGeneratorInterface $urlGenerator): Response
     {
         $current_user = $this->getUser();
 
@@ -175,8 +179,21 @@ class CapsuleController extends AbstractController
         $url = $this->getParameter('app.legacy_external_prefix') . '/' . $capsule->getEditionLink();
 
         return $this->render(
-            'project/project_view.html.twig',
-            [ 'url' => $url ]
+            'project/edit.html.twig',
+            [
+                'url' => $url,
+                'linkHome' => $urlGenerator->generate(
+                    'home',
+                    [],
+                    UrlGeneratorInterface::ABSOLUTE_URL
+                )
+                ,
+                'linkPreview' => $urlGenerator->generate(
+                    'preview_capsule',
+                    [ 'path' => $capsule->getLinkPath() ],
+                    UrlGeneratorInterface::ABSOLUTE_URL
+                )
+            ]
         );
     }
 
diff --git a/templates/project/edit.html.twig b/templates/project/edit.html.twig
index 78caedf4f50d431d4a0ae38d2f4f9a287edc567a..2faddade7986fe6a7559ad5c224986b30ce78c62 100644
--- a/templates/project/edit.html.twig
+++ b/templates/project/edit.html.twig
@@ -11,3 +11,18 @@
   </iframe>
 
 {% endblock %}
+
+{% block script %}
+  <script>
+      window.onload = function (){
+          const iframe = document.getElementById('legacyContent').contentWindow;
+          iframe.app.rekall.Rekall('init', {
+              links: {
+                  home: '{{ linkHome }}',
+                  projectPreview: '{{ linkPreview }}'
+              }
+          }
+          );
+      }
+  </script>
+{% endblock %}
\ No newline at end of file
diff --git a/templates/project/project_view.html.twig b/templates/project/project_view.html.twig
index 613f4be7e96e7eb37495b7e12ad926a94c51ec77..2a923da7148fc5e036e6e3b83bb446bf2523ae56 100644
--- a/templates/project/project_view.html.twig
+++ b/templates/project/project_view.html.twig
@@ -28,6 +28,7 @@
 	</div>
 
 	<iframe src="{{ url }}"
+					id="legacyContent"
 					style="width:100%;height:100%;top:0;left:0;position:absolute"
 
 					frameborder="0"
@@ -36,5 +37,20 @@
 					allowfullscreen>
 	</iframe>
 
+
+	{% block script %}
+		<script>
+			window.onload = function (){
+				const iframe = document.getElementById('legacyContent').contentWindow;
+				iframe.app.rekall.Rekall('init', {
+							links: {
+								home: '{{ linkHome }}'
+							}
+						}
+				);
+			}
+		</script>
+	{% endblock %}
+
 </body>
 </html>