Embed Me!

Embed video, images from links.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
eight
Installazioni giornaliere
0
Installazioni totali
396
Valutazione
6 0 0
Versione
0.4.0
Creato il
18/06/2015
Aggiornato il
24/10/2023
Dimensione
75,8 KB
Licenza
MIT
Applica a
Tutti i siti

Embed Me!

An userscript to embed videos, images from anchor link.

Test page

Install the script and visit this page:
Demo page

Supported sites

Checkout the module folder. Contributions welcome!

Module

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


Some online embedding service

Changelog

  • 0.4.0 (Oct 25, 2023)

    • Change: bundle fumen-svg.
    • Change: drop gfycat.
    • Fix: twitch vod and clip.
    • Fix: initialize domain settings correctly.
  • 0.3.0 (Jan 12, 2020)

    • Refactor.
    • Add: fumen module.
    • Add: options to toggle each module.
    • Breaking: switch to webext-pref.
  • 0.2.1 (Oct 6, 2015)

    • Support more patterns in youtube module.
  • 0.2.0 (Jun 18, 2015)

    • Update GM_config.
    • Fix image max-width.
    • Fix imgur iframe.
    • Fix youtube bug.
  • 0.1.1 (Jun 17, 2015)

    • Add @noframes.
  • 0.1.0 (Jun 17, 2015)

    • First release.