File size: 4,949 Bytes
70023bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<div id="regex_editor_template">
    <div class="regex_editor">
        <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="flex1">
                <label for="regex_script_name" class="title_restorable">
                    <small data-i18n="Script Name">Script Name</small>
                </label>
                <div>
                    <input class="regex_script_name text_pole textarea_compact" type="text" />
                </div>
            </div>
            <div class="flex1">
                <label for="find_regex" class="title_restorable">
                    <small data-i18n="Find Regex">Find Regex</small>
                </label>
                <div>
                    <input class="find_regex text_pole textarea_compact" type="text" />
                </div>
            </div>
            <div class="flex1">
                <label for="regex_replace_string" class="title_restorable">
                    <small data-i18n="Replace With">Replace With</small>
                </label>
                <div>
                    <textarea 
                        class="regex_replace_string text_pole wide100p textarea_compact"
                        placeholder="Use {{match}} to include the matched text from the Find Regex"
                        rows="2"
                    ></textarea>
                </div>
            </div>
            <div class="flex1">
                <label for="regex_trim_strings" class="title_restorable">
                    <small data-i18n="Trim Out">Trim Out</small>
                </label>
                <div>
                    <textarea 
                        class="regex_trim_strings text_pole wide100p textarea_compact"
                        placeholder="Globally trims any unwanted parts from a regex match before replacement. Separate each element by an enter."
                        rows="3"
                    ></textarea>
                </div>
            </div>
        </div>

        <div class="flex-container">
            <div class="wi-enter-footer-text flex-container flexFlowColumn flexNoGap alignitemsstart">
                <small>Affects</small>
                <div>
                    <label class="checkbox flex-container">
                        <input type="checkbox" name="replace_position" value="1">
                        <span data-i18n="Before Char">User Input</span>
                    </label>
                </div>
                <div>
                    <label class="checkbox flex-container">
                        <input type="checkbox" name="replace_position" value="2">
                        <span data-i18n="After Char">AI Output</span>
                    </label>
                </div>
                <div>
                    <label class="checkbox flex-container">
                        <input type="checkbox" name="replace_position" value="3">
                        <span data-i18n="Slash Commands">Slash Commands</span>
                    </label>
                </div>
            </div>
            <div class="wi-enter-footer-text flex-container flexFlowColumn flexNoGap alignitemsstart">
                <small>Other Options</small>
                <label class="checkbox flex-container">
                    <input type="checkbox" name="disabled" />
                    <span data-i18n="Disabled">Disabled</span>
                </label>
                <label class="checkbox flex-container">
                    <input type="checkbox" name="only_format_display" />
                    <span data-i18n="Only Format Display">Only Format Display</span>
                </label>
                <label class="checkbox flex-container">
                    <input type="checkbox" name="run_on_edit" />
                    <span data-i18n="Run On Edit">Run On Edit</span>
                </label>
                <label class="checkbox flex-container">
                    <input type="checkbox" name="substitute_regex" />
                    <span data-i18n="Substitute Regex">Substitute Regex</span>
                </label>
            </div>
            <div class="flex-container flexFlowColumn alignitemsstart">
                <small>Replacement Strategy</small>
                <select name="replace_strategy_select" class="margin0">
                    <option value="0">Replace</option>
                    <option value="1">Overlay</option>
                </select>
            </div>
        </div>
    </div>
</div>