Browse code

Fix id des totoz

Bruno Spyckerelle authored on 08/10/2016 13:00:56
Showing 2 changed files
... ...
@@ -287,7 +287,7 @@ function onMouseOver(event) {
287 287
         hilightPost(target.parentNode.parentNode.getAttribute('id'), target.parentNode.parentNode);
288 288
     } else if (targetClass.indexOf('totoz') != -1) {
289 289
         if (settings.value('totoz_mode') != TOTOZ_INLINE) {
290
-            var totoz = getTotoz(targetId);
290
+            var totoz = getTotoz(targetId.substr(6));
291 291
             showTotoz(totoz, event.clientX, event.clientY);
292 292
         }
293 293
     }
... ...
@@ -299,7 +299,7 @@ function onMouseOut(event) {
299 299
     var targetId = target.getAttribute('id');
300 300
     if (!targetClass) return;
301 301
     if (targetClass.indexOf('totoz') != -1) {
302
-        document.getElementById('totozImg[' + targetId + ']').style.display = 'none';
302
+        document.getElementById('totozImg[' + targetId.substr(6) + ']').style.display = 'none';
303 303
     }
304 304
 }
305 305
 
... ...
@@ -1,7 +1,7 @@
1 1
 function writeTotoz(message) {
2 2
     var exp = /\[\:([^\t\)\]]+)\]/g;
3 3
     if (settings.value('totoz_mode') != TOTOZ_INLINE) {
4
-        return message.replace(exp, '<span class="totoz" id="$1">[:$1]</span>');
4
+        return message.replace(exp, '<span class="totoz" id="totoz-$1">[:$1]</span>');
5 5
     } else {
6 6
         return message.replace(exp, '<img title="[:$1]" src="' + settings.value('totoz_server') + '/img/$1" />');
7 7
     }