mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-01 06:53:23 +08:00
refactor: Refactor the arguments of the Flag Operator
This commit is contained in:
@@ -104,12 +104,12 @@ function QuickSettingOperator(args) {
|
||||
}
|
||||
|
||||
// add or remove flag for proxies
|
||||
function FlagOperator(add = true) {
|
||||
function FlagOperator({ mode }) {
|
||||
return {
|
||||
name: 'Flag Operator',
|
||||
func: (proxies) => {
|
||||
return proxies.map((proxy) => {
|
||||
if (!add) {
|
||||
if (mode === 'remove') {
|
||||
// no flag
|
||||
proxy.name = removeFlag(proxy.name);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user