elninotech/uppload

View on GitHub
src/services/microlink/9gag.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { MicrolinkBaseClass } from "../../helpers/microlink";

export default class NineGag extends MicrolinkBaseClass {
  name = "ninegag";
  icon = `<svg aria-hidden="true" viewbox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><path d="M16 64L128 0l111 64v128l-111 64-112-64 44-26 68 39c22-13 45-25 67-39v-51l-67 39L16 90V64zm66 13l46 26 45-26-45-26-46 26z" fill="#000" fill-rule="nonzero"/></svg>`;
  color = "#000";
  exampleURL = "https://9gag.com/gag/awoBXb8";
  validator = (input: string) =>
    /(https?:\/\/(.+?\.)?9gag\.com(\/[A-Za-z0-9\-\._~:\/\?#\[\]@!$&'\(\)\*\+,;\=]*)?)/.test(
      input
    );
}