<commit_before>define('scribe-plugin-sticky-toolbar',['scribe-plugin-toolbar'],function (scribePluginToolbar) {
  return function (toolbarNode) {
    return function (scribe) {
      var toolbarOffsetTop = toolbarNode.offsetTop;

      // Instantiate the toolbar plugin
      scribe.use(scribePluginToolbar(toolbarNode));

      // Listen for scroll - TODO Debounce
      document.addEventListener('scroll', function () {
        toolbarNode.classList.toggle('is-sticky', (toolbarOffsetTop <= window.scrollY));<commit_msg>Fix for sticky toolbar<commit_after>define('scribe-plugin-sticky-toolbar',['scribe-plugin-toolbar'],function (scribePluginToolbar) {
  return function (toolbarNode) {
    return function (scribe) {
      var toolbarOffsetTop,
          scrolled = false;

      // Instantiate the toolbar plugin
      scribe.use(scribePluginToolbar(toolbarNode));

      // Listen for scroll - TODO Debounce
      document.addEventListener('scroll', function () {
        if(!scrolled){
          toolbarOffsetTop = toolbarNode.offsetTop;
          scrolled = true;
        }
        toolbarNode.classList.toggle('is-sticky', (toolbarOffsetTop <= window.scrollY));
{'fraction_non_alphanumeric': 0.1146278870829769, 'fraction_numerical': 0.0, 'mean_word_length': 3.588235294117647, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2373239', 'n_tokens_mistral': 311, 'n_tokens_neox': 297, 'n_words': 60}