mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-08-07 00:33:59 +09:00
feat: add oEmbed support (#6)
* feat: add oEmbed support * more safelisted features * fix the syntax * Update README.md * permissions * names * playerを使うように * fix type error * support width (for size ratio) * test for type: video * nullable width * restore max height test * ignored permissions * restore autoplay * Use WHATWG URL --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
committed by
GitHub
parent
51f3870e1f
commit
eab3766db9
6
built/plugins/amazon.d.ts
vendored
6
built/plugins/amazon.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/// <reference types="node" />
|
||||
import * as URL from 'node:url';
|
||||
import { URL } from 'node:url';
|
||||
import summary from '../summary.js';
|
||||
export declare function test(url: URL.Url): boolean;
|
||||
export declare function summarize(url: URL.Url): Promise<summary>;
|
||||
export declare function test(url: URL): boolean;
|
||||
export declare function summarize(url: URL): Promise<summary>;
|
||||
|
@ -36,8 +36,9 @@ export async function summarize(url) {
|
||||
player: {
|
||||
url: playerUrl || null,
|
||||
width: playerWidth ? parseInt(playerWidth) : null,
|
||||
height: playerHeight ? parseInt(playerHeight) : null
|
||||
height: playerHeight ? parseInt(playerHeight) : null,
|
||||
allow: playerUrl ? ['fullscreen', 'encrypted-media'] : [],
|
||||
},
|
||||
sitename: 'Amazon'
|
||||
sitename: 'Amazon',
|
||||
};
|
||||
}
|
||||
|
6
built/plugins/wikipedia.d.ts
vendored
6
built/plugins/wikipedia.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/// <reference types="node" />
|
||||
import * as URL from 'node:url';
|
||||
import { URL } from 'node:url';
|
||||
import summary from '../summary.js';
|
||||
export declare function test(url: URL.Url): boolean;
|
||||
export declare function summarize(url: URL.Url): Promise<summary>;
|
||||
export declare function test(url: URL): boolean;
|
||||
export declare function summarize(url: URL): Promise<summary>;
|
||||
|
@ -29,8 +29,9 @@ export async function summarize(url) {
|
||||
player: {
|
||||
url: null,
|
||||
width: null,
|
||||
height: null
|
||||
height: null,
|
||||
allow: [],
|
||||
},
|
||||
sitename: 'Wikipedia'
|
||||
sitename: 'Wikipedia',
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user