use alternative frontend for youtube
This commit is contained in:
parent
372ca9337c
commit
cb89348583
|
@ -140,6 +140,7 @@ export class ImageDomMutator {
|
|||
/* tslint:disable max-line-length */
|
||||
this.add('default', this.getBaseJsMutatorScript(['.content video', '.content img', '#video, video', '#image, img']));
|
||||
this.add('about:blank', '');
|
||||
this.add('yewtu.be', '');
|
||||
this.add('e621.net', this.getBaseJsMutatorScript(['video', '#image']));
|
||||
this.add('e-hentai.org', this.getBaseJsMutatorScript(['video', '#img']));
|
||||
this.add('gelbooru.com', this.getBaseJsMutatorScript(['video.gelcomVPlayer', '.post-view video', '.contain-push video', '#image']));
|
||||
|
|
|
@ -33,6 +33,13 @@ export class ImageUrlMutator {
|
|||
}
|
||||
|
||||
protected init(): void {
|
||||
this.add(
|
||||
/^http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?/,
|
||||
async(_url: string, match: RegExpMatchArray): Promise<string> => {
|
||||
const videoId = match[1]
|
||||
return `https://yewtu.be/embed/${videoId}?autoplay=1`
|
||||
}
|
||||
);
|
||||
this.add(
|
||||
/^https?:\/\/.*twitter.com\/(.*)/,
|
||||
async(url: string, match: RegExpMatchArray): Promise<string> => {
|
||||
|
|
Loading…
Reference in New Issue