title: Windows and linux formatting difference?
body: <p>So I made a little script at work where we use Linux, I had no issues there and anything was working as it should.
  When I came home to my Windows PC and tried the script out there was some formatting issue with the Output file.</p>
  <p>The Input file is just a normal .txt file where each line has a different entry, as example
  BP_Random1
  BP_Random2
  BP_Random3</p>
  <p>If I upload a file on Linux it looks like this:
  <code>{&quot;tradeable-code&quot;: &quot;BPC_Military_Backpack_01_02&quot;,&quot;base-purchase-price&quot;: &quot;-1&quot;,&quot;base-sell-price&quot;: &quot;-1&quot;,&quot;delta-price&quot;: &quot;1.5&quot;,&quot;can-be-purchased&quot;: &quot;false&quot;},</code></p>
  <p>However, on Windows it looks like this, so there is a line break after the 01_02</p>
  <pre><code>{&quot;tradeable-code&quot;: &quot;BPC_Military_Backpack_01_02
  &quot;,&quot;base-purchase-price&quot;: &quot;-1&quot;,&quot;base-sell-price&quot;: &quot;-1&quot;,&quot;delta-price&quot;: &quot;1.5&quot;,&quot;can-be-purchased&quot;: &quot;false&quot;},
  </code></pre>
  <p>Would be cool if someone knows how to fix this?</p>
  <p>Here is the Script:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;Schmutz&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type=&quot;file&quot; name=&quot;schmutz&quot; id=&quot;schmutz&quot;&gt;
  &lt;/body&gt;
  &lt;script&gt;
      document.getElementById('schmutz').onchange = function(){
      var file = this.files[0];
  
      var reader = new FileReader();
      reader.onload = function(progressEvent){
      console.log(this.result);
  
      var text = &quot;&quot;;
      var lines = this.result.split('\n');
      for(var line = 0; line &lt; lines.length; line++){
        if(line != 0){
            text += &quot;\n&quot;;
        }
          text += &quot;{\&quot;tradeable-code\&quot;: \&quot;&quot;+lines[line].replace(&quot;#spawnitem &quot;,&quot;&quot;)+&quot;\&quot;,\&quot;base-purchase-price\&quot;: \&quot;-1\&quot;,\&quot;base-sell-price\&quot;: \&quot;-1\&quot;,\&quot;delta-price\&quot;: \&quot;-1.0\&quot;,\&quot;can-be-purchased\&quot;: \&quot;false\&quot;},&quot;;
      }
  
      text = text.replace(/,*$/, '');
      console.log(text);
      download(text);
      };
      reader.readAsText(file);
  
      };
  
      function download(data, filename = &quot;schmutz.json&quot;, type = &quot;json&quot;) {
          var file = new Blob([data], {type: type});
          if (window.navigator.msSaveOrOpenBlob) // IE10+
              window.navigator.msSaveOrOpenBlob(file, filename);
          else { // Others
              var a = document.createElement(&quot;a&quot;),
                      url = URL.createObjectURL(file);
              a.href = url;
              a.download = filename;
              document.body.appendChild(a);
              a.click();
              setTimeout(function() {
                  document.body.removeChild(a);
                  window.URL.revokeObjectURL(url);  
              }, 0);
          }
      }
  
  
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>