Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
e378590d
Commit
e378590d
authored
May 17, 2023
by
Weiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remove `textual inversion` prompt
parent
ce38ee8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
javascript/extraNetworks.js
javascript/extraNetworks.js
+20
-11
No files found.
javascript/extraNetworks.js
View file @
e378590d
...
...
@@ -68,18 +68,27 @@ var re_extranet_g = /\s+<([^:]+:[^:]+):[\d\.]+>/g;
function
tryToRemoveExtraNetworkFromPrompt
(
textarea
,
text
){
var
m
=
text
.
match
(
re_extranet
)
if
(
!
m
)
return
false
var
partToSearch
=
m
[
1
]
var
replaced
=
false
var
newTextareaText
=
textarea
.
value
.
replaceAll
(
re_extranet_g
,
function
(
found
){
m
=
found
.
match
(
re_extranet
);
if
(
m
[
1
]
==
partToSearch
){
replaced
=
true
;
return
""
}
return
found
;
})
var
newTextareaText
if
(
m
)
{
var
partToSearch
=
m
[
1
]
newTextareaText
=
textarea
.
value
.
replaceAll
(
re_extranet_g
,
function
(
found
){
m
=
found
.
match
(
re_extranet
);
if
(
m
[
1
]
==
partToSearch
){
replaced
=
true
;
return
""
}
return
found
;
})
}
else
{
newTextareaText
=
textarea
.
value
.
replaceAll
(
new
RegExp
(
text
,
"
g
"
),
function
(
found
){
if
(
found
==
text
)
{
replaced
=
true
;
return
""
}
return
found
;
})
}
if
(
replaced
){
textarea
.
value
=
newTextareaText
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment