0

I am using the old Froogaloop2 Vimeo library and I know that this library is deprecated, but I have multiple embeds in a website and it was the only way I could get it to run.

There are console errors...

Uncaught TypeError: Cannot read property 'ready' of undefined at l (froogaloop2.min.js:1) 30froogaloop2.min.js:1 Uncaught TypeError: Cannot read property 'value' of undefined at l (froogaloop2.min.js:1)

I've tried to disable console.log but this unfortunately doesn't fall under that output.

console.log = function() {}

I simply want to avoid the outputs above.

Giacomo M
  • 4,450
  • 7
  • 28
  • 57
User14289
  • 189
  • 5
  • 19
  • this is not the console.log function that show this message , it seem ou have a error message . like **new Error([message[, nomFichier[, numeroLigne]]])** – Yassine CHABLI Aug 01 '19 at 15:14
  • indeed, i know, wondering how to disable error messages completely – User14289 Aug 01 '19 at 15:14
  • 1
    Short of writing your own browser, that doesn't have a console/error reporting, then forcing the entire world to use it ... I *think* you're gonna be out of luck ;) – CD001 Aug 01 '19 at 15:14
  • 1
    The normal user does not have the console open, so its already "ignored". – paskl Aug 01 '19 at 15:15
  • i read that you can wrap the whole code in a try { } catch {} ... and then maybe the error would be eliminated? – User14289 Aug 01 '19 at 15:15
  • Try this : **Error = function(){...}** – Yassine CHABLI Aug 01 '19 at 15:17
  • 2
    why would you want to do this, why not fix the issues that are causing the errors? they are there for a reason! – Andrew Daly Aug 01 '19 at 15:20
  • *"wrap the whole code in a try {} catch {}"* ... depressingly, that would actually sort of work - you're essentially catching all errors but not handling them. You'd certainly avoid that `Uncaught TypeError` as you'd be catching it... – CD001 Aug 01 '19 at 15:20
  • There's a dropdown in the developer console (Chrome) that says: **Custom levels**. If you open it you can set what you want to see (you can uncheck **Errors**). – muka.gergely Aug 01 '19 at 15:24
  • 1
    Stop trying to hide your errors, what kind of solution is that? Use the unminified JS and then check the error at line X – delboy1978uk Aug 01 '19 at 15:25
  • this is because the only way to embed multiple vimeo videos in a slider is to use OLD FROOGALOOP2... – User14289 Aug 08 '19 at 21:16

2 Answers2

1

or disable all console logs ;)

 for (let func in console) {
      console[func] = function () {};
 }
J. Doe
  • 119
  • 1
  • 8
0

If you need disable "console.log()" try this.

console.log("Hello World."); // Output : "Hello World."

console.log = function (param) {return;}

console.log("Hello World."); // Output : nothing.