Ask coding questions

← Back to all posts
script problems
DonoldJTrump (9)

So I have a bookmarklet, but when I try to translate it into a script in JS, it brakes. When I try to run it it says that there is an unexpected token on line 16. There may be more errors, but I am not good at script. @Coder100

xxpertHacker (930)

Do not post an entire file into a comment >:(

Upload it, like I said, as a FILE, in a Repl.

GatewayDuckYT (60)

All bookmarklets are js allready

Coder100 (18207)

Need a space, like this:

(function read()

You had:

Line 1 btw

DonoldJTrump (9)

@Coder100 i will see if that works

DonoldJTrump (9)

@Coder100 no it did not. the curent version of the script errors out with the following error:

ReferenceError: returnArray is not defined
    at toArray (/index.js:40:3)
    at /index.js:42:11
ch1ck3n (2076)

first you have this error

ch1ck3n (2076)

@ch1ck3n Even with that error it works for me

DonoldJTrump (9)

@DonoldJTrump it worked well as a bookmarklet

xxpertHacker (930)

What do you mean by "script"?

DonoldJTrump (9)

@xxpertHacker the index.js file has a lot of problems. i have been working on fixing all of them.

DonoldJTrump (9)

@xxpertHacker sorry for the late reply. I copied and pasted the file from my bookmarklets after i decoded ii (from escape code) and beautified it than put it in a .js file and added a space after all aintacaes of the following words:

  • function
  • elseif
  • var
    After i did that, i tried to fix all of the errors, but still i did not succeed and still errored out in line 44, saying that array was not defined.
xxpertHacker (930)

@DonoldJTrump You wrote the bookmarklets yourself?

And can you just upload the original file.

DonoldJTrump (9)

@xxpertHacker no i did not write the bookmarklet, but i found it. the bookmarklet that i use can be found in bookmarklet.js.