2

I am trying to use Chatty software for Twitch in order to retrieve the chatlog, but it saves it chatlog with a filename starting with # and I am not able to change that. Consequently, instead of the file the $.get returns the document itself i.e. the page that I am calling it on.

   $.get('#chatlog.log', function(data){
        console.log(data);
    })

Are there any viable workarounds for this?

Thank you for your time.

jacobdo
  • 1,605
  • 3
  • 15
  • 34

1 Answers1

2

Just use

$.get('%23chatlog.log', function(data){
     console.log(data);
 })

%23 encodes the hash sign as valid part of the name. In other case # is understud as a separator (fragment) in the url

Saic Siquot
  • 6,513
  • 5
  • 34
  • 56