<?php

use FileRun\Files\Plugin;

class custom_markdown_viewer extends Plugin {

	public bool $weblinksCompatible = true;
	static $localeSection = 'Custom Actions: Markdown Viewer';
	static $publicMethods = ['thumb'];

	function init() {
		$this->JSconfig = [
			"title" => self::t("Markdown Viewer"),
			'icon' => 'images/icons/markdown.svg',
			'extensions' => ['md', 'markdown'],
			"popup" => true,
			"requiredUserPerms" => ["preview"],
			"requires" => ["preview"]
		];
	}

	function run() {
		require $this->path."/display.php";
	}
}