diff --git a/fhem/www/pgm2/fhemdoc_modular.js b/fhem/www/pgm2/fhemdoc_modular.js index f6f267bf7..57fe5436b 100644 --- a/fhem/www/pgm2/fhemdoc_modular.js +++ b/fhem/www/pgm2/fhemdoc_modular.js @@ -204,7 +204,6 @@ fd_csrfRefresh(callback) { if(fd_mode != "FHEM") return; - console.log("fd_csrfRefresh"); $.ajax({ url:location.pathname.replace(/docs.*/,'')+"?XHR=1", success: function(data, textStatus, request){ @@ -265,8 +264,15 @@ $(document).ready(function(){ for(var i1 in fd_otherSrc) fd_modLinks[i1] = fd_otherSrc[i1]; - if(location.hash && location.hash.length > 1) - loadOneDoc(location.hash.substr(1), fd_lang); + if(location.hash && location.hash.length > 1) { + var h = location.hash.substr(1); + var m = h.match(/(.*)(&fwcsrf=.*)$/); + if(m) { + h = m[1]; + csrfToken = m[2]; + } + loadOneDoc(h, fd_lang); + } $(window).bind('hashchange', function() { if(location.hash.length > 1) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index c4605d3a0..5af656da9 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -372,6 +372,14 @@ FW_displayHelp(devName, sel, selType, val, group) $(sel).closest("div[cmd='"+selType+"']") .after('
') $("#devSpecHelp").html($(liTag).html()); + $("#devSpecHelp a").each(function(){ // #130694 + var href = $(this).attr("href"); + if(href && href.indexOf("#") == 0) { + $(this).attr("target", "_blank"); + $(this).attr("href", + addcsrf(FW_root+"/docs/commandref.html"+$(this).attr("href"))); + } + }); } } wb.remove();