Regex: Add an about section in editor

Adds a small helpful message in the editor and a link to regexr
for learning regex interactively.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-07-05 15:51:47 -04:00
parent 8212206d50
commit 3168ee536e
2 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,15 @@
<div id="regex_editor_template"> <div id="regex_editor_template">
<div class="regex_editor"> <div class="regex_editor">
<h3><strong>Regex Editor</strong></h3> <h3><strong data-i18n="Regex Editor">Regex Editor</strong>
<a href="https://regexr.com/" class="notes-link" target="_blank">
<span class="note-link-span">?</span>
</a>
</h3>
<small class="flex-container extensions_info">
Regex is a tool to find/replace strings using regular expressions. If you want to learn more, click on the ? next to the title.
</small>
<hr />
<div class="flex-container flexFlowColumn"> <div class="flex-container flexFlowColumn">
<div class="flex1"> <div class="flex1">

View File

@@ -171,7 +171,6 @@ async function onRegexEditorOpenClick(existingId) {
// Workaround for loading in sequence with other extensions // Workaround for loading in sequence with other extensions
// NOTE: Always puts extension at the top of the list, but this is fine since it's static // NOTE: Always puts extension at the top of the list, but this is fine since it's static
jQuery(async () => { jQuery(async () => {
console.log("REGEX CALLED")
// Manually disable the extension since static imports auto-import the JS file // Manually disable the extension since static imports auto-import the JS file
if (extension_settings.disabledExtensions.includes("regex")) { if (extension_settings.disabledExtensions.includes("regex")) {
return; return;