cbplus icon indicating copy to clipboard operation
cbplus copied to clipboard

Adding a cam doesn't work

Open Raydor opened this issue 5 years ago • 0 comments

When I click "ADD" and then type a model name, it doesn't even add the cam. Looks like the XML request is not received for some reason :(

EDIT: NVM found the cause, due to being spanish, im always redirected to "es.chaturbate.com" so I had to modify code of the GET to that URL


Also a personal suggestion is that it would be cool if you added a "+" button to add a model by just clicking a button, similar to the blacklist one. Something like this (but with the "div" parameter somewhat working for the addCam method):

let addButton = document.createElement('div')
    addButton.innerHTML = '✅'
    addButton.setAttribute("name", tmpName)
    addButton.onclick = function () {
      let name = this.getAttribute("name")
      globals.http.open('GET', `https://chaturbate.com/${name}`, true)
      globals.http.setRequestHeader("Content-type","application/x-www-form-urlencoded")
      globals.http.onload = function() { addCam(globals.http.responseText, '', name) }
      globals.http.send()
    }
    buttons.appendChild(addButton)

Raydor avatar Sep 24 '20 23:09 Raydor