image->get_mime(), $supported_types)) { $this->theme->reverse_search_block($page, $event->image); } } /** * Supported reverse search services */ protected array $SERVICES = [ 'SauceNAO', 'TinEye', 'trace.moe', 'ascii2d', 'Yandex' ]; private function get_options(): array { global $config; $output = []; $services = $this->SERVICES; foreach ($services as $service) { $output[$service] = $service; } return $output; } /** * Set default config values */ public function onInitExt(InitExtEvent $event) { global $config; $config->set_default_array( ReverseSearchLinksConfig::ENABLED_SERVICES, ['SauceNAO', 'TinEye', 'trace.moe', 'ascii2d', 'Yandex'] ); } }