Youtube HD

Select a youtube resolution and resize the player.

< Обсуждения Youtube HD

Отзыв: Хороший — скрипт работает как нужно

Deleted user 25884
§
Создано: 03.01.2022
Отредактировано: 03.01.2022

Small bug, otherwise working good:

Uncaught TypeError: idMatch.exec(...) is null
    getVideoIDFromURL moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:142
    setResOnReady moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:228
    main moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:379
    xb https://www.youtube.com/s/desktop/18069be1/jsbin/webcomponents-sd.vflset/webcomponents-sd.js:40
    dispatchEvent https://www.youtube.com/s/desktop/18069be1/jsbin/webcomponents-sd.vflset/webcomponents-sd.js:105
    fire https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:3844
    d https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:20057
    31533_onFulfilled https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:760
    Jea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:770
    Fea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:770
    executeCallbacks_ https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:769
    fea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:660
eval line 4 > eval:142:20
    getVideoIDFromURL moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:142
    setResOnReady moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:228
    main moz-extension://68085515-76f4-411b-a237-23c4cb9c1023/userscripts/Youtube HD.user.js?id=fc761042-a7d9-4c3e-95a4-16e8d4f586da:379
    xb https://www.youtube.com/s/desktop/18069be1/jsbin/webcomponents-sd.vflset/webcomponents-sd.js:40
    dispatchEvent https://www.youtube.com/s/desktop/18069be1/jsbin/webcomponents-sd.vflset/webcomponents-sd.js:105
    fire https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:3844
    d https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:20057
    <anonym> self-hosted:1175
    31533_onFulfilled https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:760
    Jea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:770
    Fea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:770
    executeCallbacks_ https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:769
    fea https://www.youtube.com/s/desktop/18069be1/jsbin/desktop_polymer.vflset/desktop_polymer.js:660

    // Get video ID from the currently loaded video (which might be different than currently loaded page)
    function getVideoIDFromURL(ytPlayer)
    {
        const idMatch = /(?:v=)([\w\-]+)/;
        let videoURL = ytPlayer.getVideoUrl();
        let id = idMatch.exec(videoURL)[1] || "ERROR: idMatch failed; youtube changed something";

        return id;
    }

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_type

adisibАвтор
§
Создано: 09.01.2022

Thanks for reporting. It looks like this occurs when searching, so it wouldn't actually affect functionality. But it should be fixed in the latest version now.

Ответить

Войдите, чтобы ответить.