diff --git a/src/main/resources/META-INF/resources/frontend/src/fc-sharee-connector.js b/src/main/resources/META-INF/resources/frontend/src/fc-sharee-connector.js index ce1983d..2fc0f6d 100644 --- a/src/main/resources/META-INF/resources/frontend/src/fc-sharee-connector.js +++ b/src/main/resources/META-INF/resources/frontend/src/fc-sharee-connector.js @@ -22,12 +22,14 @@ import Sharee from 'sharee'; window.fcShareeConnector = { create: function (container, optionsJson) { + this._updateXButtonLabel(); this._updateCopyDriverOnClick(); let parsedOptions = JSON.parse(optionsJson); const sharee = new Sharee(container, parsedOptions); }, createWithCustomDrivers: function (container, optionsJson) { + this._updateXButtonLabel(); this._updateCopyDriverOnClick(); let parsedOptions = JSON.parse(optionsJson); // add the custom drivers to the list of drivers @@ -114,5 +116,14 @@ window.fcShareeConnector = { }, 5000) }); } - } + }, + + /* + * Workaround to X driver button text to show only "X" instead "X.com" as in the base component. + */ + _updateXButtonLabel() { + Sharee.drivers['x'].prototype.getButtonText = function () { + return "X"; + } + } }