<commit_before>$(document).ready(function(){$("body").hide().fadeIn(1000);});

var slinkyRosDisplay = new ROSLIB.Ros({
  url: 'wss://42-b:9090'
});

var displaySwitchTopic = new ROSLIB.Topic({
  ros: slinkyRosDisplay,
  name: '/display/switch',
  messageType: 'std_msgs/String',
});

displaySwitchTopic.subscribe(function(msg){
  var url = msg.data;
  $('body').fadeOut(2000, function() { document.location = url } );
});<commit_msg>Remove white flashes when changing URL<commit_after>$(document).ready(function(){$("body").hide().fadeIn(1000);});

var slinkyRosDisplay = new ROSLIB.Ros({
  url: 'wss://42-b:9090'
});

var displaySwitchTopic = new ROSLIB.Topic({
  ros: slinkyRosDisplay,
  name: '/display/switch',
  messageType: 'std_msgs/String',
});

displaySwitchTopic.subscribe(function(msg){
  var url = msg.data;

  // the below line causes the white flickering
  // $('body').fadeOut(2000, function() { document.location = url } );

  document.location = url;
});
{'fraction_non_alphanumeric': 0.18846549948506694, 'fraction_numerical': 0.028836251287332648, 'mean_word_length': 5.191082802547771, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4221125', 'n_tokens_mistral': 363, 'n_tokens_neox': 320, 'n_words': 64}