你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/10481-embed-me,源站連結 點此以跳轉。
Embed video, images from links.
An userscript to embed videos, images from anchor link.
Install the script and visit this page:
Demo page
Checkout the module folder. Contributions welcome!
A module object should look like:
{
name: "The module name",
global: true, // The module should work globally,
domains: ["example.com"], // or the module will only work on these domains.
getPatterns: function() {
// Return a list of regex object. Only matched urls will be sent to embed function.
return [
// ...
];
},
getEmbedFunction: function() {
// Return an embedding function.
//
// Params:
// 1...n The capturing groups returned by regex pattern. n = groups.length.
// n+1 The url of the link.
// n+2 The text content of the link.
// n+3 The link itself.
// n+4 A replace function.
//
// Usually you can return new element back. If you have to replace element asynchronously,
// send new element to replace function when you are finished.
return function (url, text, node, replace) {
// ...
}
}
}
Known issues
0.4.0 (Oct 25, 2023)
0.3.0 (Jan 12, 2020)
0.2.1 (Oct 6, 2015)
0.2.0 (Jun 18, 2015)
0.1.1 (Jun 17, 2015)
0.1.0 (Jun 17, 2015)