avoid the flash of unstyled content.
This commit is contained in:
parent
717a7a089c
commit
8413909a28
@ -11,7 +11,7 @@ function changeTheme(theme) {
|
||||
}
|
||||
|
||||
function changeSyntax(syntax) {
|
||||
el = $('body');
|
||||
el = $('html');
|
||||
|
||||
if (!syntax) {
|
||||
syntax = el.hasClass('scss') ? 'sass': 'scss';
|
||||
@ -56,6 +56,9 @@ function getSyntaxPreference(defaultSyntax) {
|
||||
}
|
||||
|
||||
|
||||
getThemePreference('dark');
|
||||
getSyntaxPreference('scss');
|
||||
|
||||
$('document').ready(function(){
|
||||
$('#page').click(function(event){
|
||||
var target = $(event.target);
|
||||
@ -70,6 +73,4 @@ $('document').ready(function(){
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
getThemePreference('dark');
|
||||
getSyntaxPreference('scss');
|
||||
})
|
Loading…
Reference in New Issue
Block a user