<?php

use FileRun\Files\Plugin;

class custom_plain_text_viewer extends Plugin {

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

	function init() {
		$this->JSconfig = [
			"title" => self::t("Text Viewer"),
			'iconCls' => 'fa-file-text-o',
			'useWith' => ['txt', 'noext'],
			"popup" => true,
			"requiredUserPerms" => ["preview"],
			"requires" => ["preview"]
		];
	}

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