mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-20 14:27:29 +08:00
console: scripts to new options screen
This commit is contained in:
@@ -152,7 +152,9 @@ class Options(urwid.WidgetWrap):
|
||||
),
|
||||
Option(
|
||||
"Scripts",
|
||||
"S"
|
||||
"S",
|
||||
lambda: master.scripts,
|
||||
self.scripts
|
||||
),
|
||||
|
||||
Heading("Interface"),
|
||||
@@ -239,6 +241,7 @@ class Options(urwid.WidgetWrap):
|
||||
self.master.setheaders.clear()
|
||||
self.master.replacehooks.clear()
|
||||
self.master.set_ignore_filter([])
|
||||
self.master.scripts = []
|
||||
signals.update_settings.send(self)
|
||||
signals.status_message.send(
|
||||
message = "All options cleared",
|
||||
@@ -300,3 +303,12 @@ class Options(urwid.WidgetWrap):
|
||||
_set
|
||||
)
|
||||
)
|
||||
|
||||
def scripts(self):
|
||||
self.master.view_grideditor(
|
||||
grideditor.ScriptEditor(
|
||||
self.master,
|
||||
[[i.command] for i in self.master.scripts],
|
||||
self.master.edit_scripts
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user