2025-02-23 20:52:25 +01:00

1 line
1.3 KiB
JavaScript

"use strict";$(document).ready(function(){xdesktop.afterReady()});$(window).resize(function(){xdesktop.windowResize()});var xdesktop=new function(){var _this=this;this.afterReady=function(){setTimeout(function(){xdesktop.windowResize()},0);if($(".compact-message-list #listoptions fieldset").length){$("#listoptions fieldset:first").remove()}if($("body.skin-icloud.login-page").length&&!$("body.xbackground-login-image").length){var iconDiv=$("<div/>").addClass("icl-icons");var icount=0;for(var i=1;i<=13;i++){iconDiv.append($("<img/>").addClass("icl-icon-"+i).attr("src","skins/icloud/assets/images/icon-"+i+".png").attr("alt","").on("load",function(){icount++;if(icount>=13){setTimeout(function(){iconDiv.fadeIn(800)},500)}}))}$("body").append(iconDiv)}_this.enableIdentSwitch()};this.windowResize=function(){var toolbar=$(".toolbar");if(toolbar.length){var width=toolbar.width()+5;var element=$("#searchfilter");if(element.length){element.css("visibility",element.offset().left<width?"hidden":"visible")}element=$("#quicksearchbar");if(element.length){element.css("visibility",element.offset().left<width?"hidden":"visible")}}};this.enableIdentSwitch=function(){if(!rcmail.env["rcp_skin"]){return}var select=$("#plugin-ident_switch-account");if(!select.length||typeof plugin_switchIdent_addCbLarry!=="function"){return}if(plugin_switchIdent_addCbLarry(select)){select.show()}}};