Ask coding questions

← Back to all posts
script problems
h
DonoldJTrump (6)

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

Comments
hotnewtop
xxpertHacker (860)

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

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

GatewayDuckYT (48)

All bookmarklets are js allready

Coder100 (17090)

Need a space, like this:

(function read()

You had:
(functionread()

Line 1 btw

DonoldJTrump (6)

@Coder100 i will see if that works

DonoldJTrump (6)

@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 (1626)

first you have this error

ch1ck3n (1626)

@ch1ck3n Even with that error it works for me

DonoldJTrump (6)

@DonoldJTrump it worked well as a bookmarklet

xxpertHacker (860)

What do you mean by "script"?

DonoldJTrump (6)

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

DonoldJTrump (6)

@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 (860)

@DonoldJTrump You wrote the bookmarklets yourself?

And can you just upload the original file.

DonoldJTrump (6)

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