Youtube - Search While Watching Video

Search YouTube without interrupting the video, by loading the search results in the related video bar

< Feedback on Youtube - Search While Watching Video

Question/comment

§
Posted: 2023-10-06
Edited: 2023-10-06

Hi Cptmathix,

I have just reviewed the coding and issue for the auto-complete.js used in your userscript. The last update was Feb 2016, and there are still many issues and bugs not fixed.

Could you please update the library to my 1.2.0 version? So I don't need to add the extra code in my Tabview Youtube in order to compatible for your userscript.

The usage is the same, just update the js file, and some minor changes in css rules.

For details, see PR#95 https://github.com/Pixabay/JavaScript-autoComplete/pull/95

From:

.autocomplete-suggestions {
text-align: left; cursor: default; border: 1px solid var(--ytd-searchbox-legacy-border-color); border-top: 0; background: var(--ytd-searchbox-background);
position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
}
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.22em; color: var(--ytd-searchbox-text-color); }
.autocomplete-suggestion b { font-weight: normal; color: #b31217; }
.autocomplete-suggestion.selected { background: #ddd; }
[dark] .autocomplete-suggestion.selected { background: #333; }

To:

.autocomplete-suggestions {
text-align: left; cursor: default; border: 1px solid var(--ytd-searchbox-legacy-border-color); border-top: 0; background: var(--ytd-searchbox-background);
position: absolute; /*display: none; z-index: 9999;*/ max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
    left: auto; top: auto; width: 100%; margin: 0; contain: content; /* 1.2.0 */
}
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.22em; color: var(--ytd-searchbox-text-color); }
.autocomplete-suggestion b { font-weight: normal; color: #b31217; }
.autocomplete-suggestion.selected { background: #ddd; }
[dark] .autocomplete-suggestion.selected { background: #333; }

autocomplete-holder {
    overflow: visible; position: absolute; left: auto; top: auto; width: 100%; height: 0; z-index: 9999; box-sizing: border-box; margin:0; padding:0; border:0; contain: size layout;
}

Also, please do the same for Youtube Play Next Queue, thanks.

CptmathixAuthor
§
Posted: 2023-11-08

Hi CY Fung,

Sorry for the delay, script has been updated

Kr,
Cptmathix

Post reply

Sign in to post a reply.