Directly load editor on supported browsers

This commit is contained in:
Raphael Michel
2020-04-02 18:16:33 +02:00
parent 0c0fe58bbf
commit 2ae9e3e0d9

View File

@@ -322,12 +322,21 @@ var editor = {
},
_ready: function () {
$("#editor-loading").hide();
$("#editor-start").removeClass("sr-only");
$("#editor-start").click(function () {
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
var isFirefox = typeof InstallTrigger !== 'undefined';
var isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
var isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1);
if (isChrome || isOpera || isFirefox || isEdgeChromium) {
$("#loading-container").hide();
$("#loading-initial").remove();
});
} else {
$("#editor-loading").hide();
$("#editor-start").removeClass("sr-only");
$("#editor-start").click(function () {
$("#loading-container").hide();
$("#loading-initial").remove();
});
}
},
_update_toolbox_values: function () {