From 63e4989aa5a00dd4d34e11e49042845db8a0a6a1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 13 Nov 2014 12:46:09 -0500 Subject: [PATCH] Don't append created iframe to document if it's going to be appended to a dialog - skip redundant http request + small CS improvements --- skins/larry/ui.js | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/skins/larry/ui.js b/skins/larry/ui.js index c8204b6..eac9ff9 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -1138,14 +1138,11 @@ */ function show_about(elem) { - var frame = $('<iframe>').attr('id', 'aboutframe') - .attr('src', rcmail.url('settings/about')) - .attr('frameborder', '0') - .appendTo(document.body); + var frame = $('<iframe>').attr({id: 'aboutframe', src: rcmail.url('settings/about'), frameborder: '0'}); + h = Math.floor($(window).height() * 0.75), + buttons = {}, + supportln = $('#supportlink'); - var h = Math.floor($(window).height() * 0.75); - var buttons = {}; - var supportln = $('#supportlink'); if (supportln.length && (env.supporturl = supportln.attr('href'))) buttons[supportln.html()] = function(e){ env.supporturl.indexOf('mailto:') < 0 ? window.open(env.supporturl) : location.href = env.supporturl }; -- Gitblit v1.9.1