Inject2Download

Simple media download script

< Σχολιασμός για τον κώδικα Inject2Download

Αναφορά: Καλός - ο κώδικας λειτουργεί

§
Δημοσιεύτηκε: 06/03/2018

Check is player object initiated

Hi, I'm developing RU AdList JS Fixes (https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes/) script and made a wrapper for videojs player in it to catch when it's created and clean it up from ads before returning player object to a page. For that I define videojs getter/setter on all pages and when someone attempts to set it I wrap it with my code. As I understood your script checks if 'videojs' is defined in window and due to a way I implemented my code it is, but it returns 'undefined' which causes crash in your script.

Could you please add check that videojs is non-falsy value? Something like:
if ("videojs" in window && window.videojs && !window.videojs.INJECTED)

AnonymousMeerkatΔημιουργός
§
Δημοσιεύτηκε: 06/03/2018

Thank you very much! It's fixed now :)

§
Δημοσιεύτηκε: 06/03/2018

Lain inVerse and AnonymousMeerkat, thank you.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.