loleaflet/src/core/Socket.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit 622102965ccfea7dda6dd542df246cdf128c4d07 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Mar 23 19:33:58 2020 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Tue Mar 24 12:44:45 2020 +0100 Use window.open for the git hashes in the About dialog This will turn into the HYPERLINK message and make it work to click them in the mobile apps, too. Change-Id: Ibf1829a16887db2a6797c08996bd52882b54a657 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90935 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index b4118479f..498c49e28 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -276,9 +276,7 @@ L.Socket = L.Class.extend({ this.WSDServer = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); var h = this.WSDServer.Hash; if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) { - if (!window.ThisIsAMobileApp) { - h = '<a target="_blank" href="https://hub.libreoffice.org/git-online/' + h + '">' + h + '</a>'; - } + h = '<a target="_blank" href="javascript:window.open(\'https://hub.libreoffice.org/git-online/' + h + '\');">' + h + '</a>'; $('#loolwsd-version').html(this.WSDServer.Version + ' (git hash: ' + h + ')'); } else { @@ -300,8 +298,8 @@ L.Socket = L.Class.extend({ else if (textMsg.startsWith('lokitversion ')) { var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); h = lokitVersionObj.BuildId.substring(0, 7); - if (!window.ThisIsAMobileApp && parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) { - h = '<a target="_blank" href="https://hub.libreoffice.org/git-core/' + h + '">' + h + '</a>'; + if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) { + h = '<a target="_blank" href="javascript:window.open(\'https://hub.libreoffice.org/git-core/' + h + '\');">' + h + '</a>'; } $('#lokit-version').html(lokitVersionObj.ProductName + ' ' + lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension.replace('.10.','-') + _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
