From 2d09304ab6baf6f53c07aa180832b190738fd22a Mon Sep 17 00:00:00 2001
From: Lucio Zambon <lucio.zambon@elettra.eu>
Date: Thu, 3 Oct 2024 03:14:36 +0000
Subject: [PATCH] Update panther.php

---
 panther.php | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/panther.php b/panther.php
index 3c055d0..b49ef67 100644
--- a/panther.php
+++ b/panther.php
@@ -26,11 +26,6 @@
 				}
 			}
 		</script>
-		<script>;
-			const client = '<?php echo gethostbyaddr($_SERVER['REMOTE_ADDR']);?>'.split('.')[0];
-			const fermi = ['do','re','mi','fa','sol','la','si'].indexOf(client)>-1? '?machine=fermi': '';
-			if (navigator.userAgent.indexOf('Firefox/63')>-1) document.location = './ff63/'+fermi;
-		</script>
 
 		<style>
 			body {
@@ -59,6 +54,18 @@
 		<link rel="stylesheet" href="<?php echo ($local? '../lib/jquery/jquery-ui.min.css': 'https://code.jquery.com/ui/1.13.3/themes/base/jquery-ui.css');?>">
 		<script src="<?php echo ($local? '../lib/jquery/jquery.min.js': 'https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js');?>" type="text/javascript"></script>
 		<script src="<?php echo ($local? '../lib/jquery/jquery-ui.min.js': 'https://cdn.jsdelivr.net/npm/jquery-ui@1.13.3/dist/jquery-ui.min.js');?>" type="text/javascript"></script>
+		<script>;
+			const client = '<?php echo gethostbyaddr($_SERVER['REMOTE_ADDR']);?>'.split('.')[0];
+			const fermi = ['do','re','mi','fa','sol','la','si'].indexOf(client)>-1 && document.location.search.indexOf('machine=elettra')==-1? '?machine=fermi': '';
+			if (navigator.userAgent.indexOf('Firefox/63')>-1) {
+				document.location = './ff63/'+fermi;
+			}
+			if (document.location.pathname.indexOf('ff63')>-1) {
+				$('#tooltip').show();
+				$('#tooltip').css('left', '5px');
+				$('#tooltip').css('top', '5px');
+			}
+		</script>
 	</head>
 
 	<body style="overflow: hidden;">
@@ -83,4 +90,4 @@
 			Data source <a href='https://drive.elettra.eu/group/268/'>https://drive.elettra.eu/group/268/</a>
 		</div>
 	</body>
-</html>
+</html>
\ No newline at end of file
-- 
GitLab