Sha256: 34d26dc469978ffa4428961c9921cf3e4077358b693391b421cf6886482354b5

Contents?: true

Size: 587 Bytes

Versions: 10

Compression:

Stored size: 587 Bytes

Contents

const SplitCode = () => {

  $('.code-scss').each(function(i,val) {
    let string  = $(this).text().split(' ');

    $(string).each(function(i,val) {
      let letters = val.length,
          last    = letters - 1;

      if (val.indexOf('.') >= 0 || val.indexOf('&') >= 0) {
        string.splice( i , 1 , val);
      }

      if ($(this)[last] == '}') {
        string.splice( i , 1 , val);
      }

    });

    let newString = string.join(' ');

    $(this).text(newString);

  });

  let htmlstring = $('.code-html').html();

  $('.code-html').text(htmlstring);

}

$(SplitCode);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
futuro-0.3.8 assets/js/footer/custom/SplitCode.js
futuro-0.3.7 assets/js/footer/custom/SplitCode.js
futuro-0.3.6 assets/js/custom/SplitCode.js
futuro-0.3.5 assets/js/custom/SplitCode.js
futuro-0.3.4 assets/js/custom/SplitCode.js
futuro-0.3.3 assets/js/custom/SplitCode.js
futuro-0.3.2 assets/js/custom/SplitCode.js
futuro-0.3.1 assets/js/custom/_SplitCode.js
futuro-0.3.0 assets/js/custom/_SplitCode.js
futuro-0.2.9 assets/js/custom/_SplitCode.js