[Libreoffice-commits] online.git: loleaflet/src

Gary Kim (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 22 16:22:22 UTC 2020


 loleaflet/src/core/Socket.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6d7128e79301c73557f65968b2f46740977e6364
Author:     Gary Kim <gary at garykim.dev>
AuthorDate: Mon May 18 23:14:07 2020 +0800
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Jun 22 18:22:03 2020 +0200

    fix: remove target="_blank" on javascript open links
    
    Using target="_blank" on these links cause them
    to not work in browsers.
    
    This commit removes the attribute to fix the issue.
    
    Change-Id: I157f15589b17722aa5c0ef5eada02084fe5b2a5e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94435
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 9f48d3145..80decbee2 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -283,7 +283,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+/, '')) {
-				h = '<a target="_blank" href="javascript:window.open(\'https://hub.libreoffice.org/git-online/' + h + '\');">' + h + '</a>';
+				h = '<a href="javascript:window.open(\'https://hub.libreoffice.org/git-online/' + h + '\');">' + h + '</a>';
 				$('#loolwsd-version').html(this.WSDServer.Version + ' (git hash: ' + h + ')');
 			}
 			else {
@@ -306,7 +306,7 @@ L.Socket = L.Class.extend({
 			var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
 			h = lokitVersionObj.BuildId.substring(0, 7);
 			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>';
+				h = '<a href="javascript:window.open(\'https://hub.libreoffice.org/git-core/' + h + '\');">' + h + '</a>';
 			}
 			$('#lokit-version').html(lokitVersionObj.ProductName + ' ' +
 			                         lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension.replace('.10.','-') +


More information about the Libreoffice-commits mailing list