* Probes the Selenium search plugin to check if it's available. * @returns {Promise } Whether the plugin is available
()
| 1257 | * @returns {Promise<boolean>} Whether the plugin is available |
| 1258 | */ |
| 1259 | async function probeSeleniumSearchPlugin() { |
| 1260 | try { |
| 1261 | const result = await fetch('/api/plugins/selenium/probe', { |
| 1262 | method: 'POST', |
| 1263 | headers: getRequestHeaders(), |
| 1264 | }); |
| 1265 | |
| 1266 | if (!result.ok) { |
| 1267 | console.debug('WebSearch: plugin probe failed', result.statusText); |
| 1268 | return false; |
| 1269 | } |
| 1270 | |
| 1271 | return true; |
| 1272 | } catch (error) { |
| 1273 | console.error('WebSearch: plugin probe failed', error); |
| 1274 | return false; |
| 1275 | } |
| 1276 | } |
| 1277 | |
| 1278 | /** |
| 1279 | * |