Preventing flash of style

This commit is contained in:
j0be 2016-09-26 12:35:41 -04:00 committed by GitHub
parent b724d42d8f
commit a6cbaaffb7

View file

@ -38,6 +38,7 @@ var pdApp = {
context: $('#pd__style') context: $('#pd__style')
}).then(function(data) { }).then(function(data) {
$(this)[0].innerHTML = data.data.stylesheet; $(this)[0].innerHTML = data.data.stylesheet;
$('#pd__central').show();
}, function() { }, function() {
alert('Error retreiving CSS from /r/PowerDeleteSuite'); alert('Error retreiving CSS from /r/PowerDeleteSuite');
}); });
@ -48,6 +49,9 @@ var pdApp = {
context: $('#pd__central') context: $('#pd__central')
}).then(function(data) { }).then(function(data) {
$(this).html($("<textarea/>").html(data.data.content_md).text()); $(this).html($("<textarea/>").html(data.data.content_md).text());
if ($('#pd__stlye').html() === '') {
$(this).hide();
}
pdApp.setup.prepSubs(); pdApp.setup.prepSubs();
pdApp.setup.bindUI(); pdApp.setup.bindUI();
}, function() { }, function() {