loleaflet/src/control/Control.Menubar.js | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 9fcd0ec196a3acfbb5486566878bcf7eac6e8839 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Tue Aug 18 14:17:38 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Aug 18 15:22:04 2020 +0200 polyfill endsWidth for IE11 Change-Id: I4a2d3af2ccffdc7dcd79ff24e00c909bc57d365e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100807 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index bb868473f..4fe7ba101 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -1387,6 +1387,16 @@ L.Control.Menubar = L.Control.extend({ if (menuItem.drawing === false && this._map.getDocType() === 'drawing') return false; + // polyfill endsWidth for IE11 + if (!String.prototype.endsWith) { + String.prototype.endsWith = function(search, thisLen) { + if (thisLen === undefined || thisLen > this.length) { + thisLen = this.length; + } + return this.substring(thisLen - search.length, thisLen) === search; + }; + } + if (menuItem.id === 'downloadas-odg' && !this._map['wopi'].BaseFileName.endsWith('.odg')) return false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits