Youtube HD

Select a youtube resolution and resize the player.

< 腳本Youtube HD的回應

評論:正評 - 腳本一切正常

Deleted user 25884
§
發表於:2022-01-03
編輯:2022-01-03

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作者
§
發表於:2022-01-09

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.

發表回覆

登入以回復