$(document).ready(function() { if(window.location.href.indexOf("home.php?m=ftp") != -1 ) { $('iframe').attr('id', 'ftp_iframe').css('background-color', ''); $('iframe').load(function() { $(this).contents().find("tr").removeAttr("onmouseover").removeAttr("onmouseout"); $(this).contents().find("body").addClass('ftp_iframe dark-mode'); $(this).contents().find("div, input").removeAttr("style"); $(this).contents().find("table").removeAttr("style").removeAttr("colspan").addClass('table table-sm table-striped'); $(this).contents().find(".page > table > tbody > tr:nth-child(3)").remove(); $(this).contents().find('b[style="color:red;"]').removeAttr('style').addClass('alert alert-danger'); $(this).contents().find('.table .table').addClass('inner-table'); $(this).contents().find('link').remove(); var main_css = ''; var ftp_css = ''; var fa_css = ''; var bs = ''; var js = ''; $(this).contents().find("head").append(bs); $(this).contents().find("head").append(js); $(this).contents().find("head").append(main_css); $(this).contents().find("head").append(ftp_css); $(this).contents().find("head").append(fa_css); $(this).contents().find('button, input[type=button], [type=submit], input[type=reset], .swfuploadbtn').addClass('btn btn-sm btn-primary mb-1'); $(this).contents().find('textarea, select, input[type=text]').addClass('form-control').removeAttr('style'); $(this).contents().find('form').addClass('form-group'); $(this).contents().find('.browse_rows_heading a').removeAttr('style').addClass('btn btn-xs btn-primary'); $(this).contents().find('[href^="javascript:submitBrowseForm(\'%2F\'"]').addClass('btn btn-xs btn-primary').prepend(' '); $(this).contents().find('[href^="javascript:submitBrowseForm"]:not(.btn)').addClass('badge badge-default'); $(this).contents().find('[onclick*="view"] > a').addClass('btn btn-xs btn-success'); $(this).contents().find('[onclick*="edit"] > a').addClass('btn btn-xs btn-warning'); $(this).contents().find('[href^="javascript:toggleElement(\'upload\')"]').addClass('btn btn-xs btn-danger'); $(this).contents().find('img[src$="folder.png"]').replaceWith(''); $(this).contents().find('img[src$="txt.png"]').replaceWith(''); $(this).contents().find('img[src$="mime.png"], img[src$="exec.png"]').replaceWith(''); $(this).contents().find('img[src$="bookmark.png"]').replaceWith(''); $(this).contents().find('img[src$="info.png"]').replaceWith(''); $(this).contents().find('img[src$="exit.png"]').replaceWith(''); $(this).contents().find('img[src$="view_tree.png"]').replaceWith(''); $(this).contents().find('img[src$="mime.png"]').replaceWith(''); $(this).contents().find('img[src$="tgz.png"]').replaceWith(''); $(this).contents().find('img[src$="document.png"]').replaceWith(''); $(this).contents().find('img[src$="terminal.png"]').replaceWith(''); $(this).contents().find('img[src$="colors.png"]').replaceWith(''); $(this).contents().find('img[src$="misc.png"]').remove(); $(this).contents().find('img[src$="back.png"]').replaceWith(''); $(this).contents().find('[accesskey="h"]').addClass('btn btn-warning'); $(this).contents().find('[accesskey="i"]:not(input)').addClass('btn btn-info'); $(this).contents().find('[accesskey="l"]').addClass('btn btn-danger'); $(this).contents().find('[accesskey="b"]').addClass('btn btn-primary'); $('iframe').contents().find('table h1').each(function(){ $(this).parent('td').replaceWith('