Compare commits

...

2 commits

2 changed files with 14 additions and 0 deletions

View file

@ -21,3 +21,8 @@ defaultPref("widget.use-xdg-desktop-portal.file-picker", 0);
// Needs to be disabled to enable dark mode
defaultPref("privacy.resistFingerprinting", false);
// TODO: somehow enable dark mode declaratively
// Disable HTTP only BS
[
"first_add_exception_on_failiure", "only_mode", "first_pbm"
].forEach(s => defaultPref(`dom.security.https_${s}`, false))

View file

@ -209,6 +209,11 @@ fn ui(buf_writer: anytype, entries: []command.Command) !command.Command {
try updateStyle(w, .{ .foreground = .Green }, &style);
try w.print("{s}\n", .{entry.label});
}
try updateStyle(w, .{
.foreground = .Red,
.font_style = .{ .bold = true },
}, &style);
try w.writeAll("\n[#] EMERGENCY SHELL\n");
try at.format.resetStyle(w);
style = .{};
@ -224,6 +229,10 @@ fn ui(buf_writer: anytype, entries: []command.Command) !command.Command {
var c: [1]u8 = undefined;
while (cmd == null) {
std.debug.assert(try std.io.getStdIn().read(&c) == 1);
if (c[0] == '#') {
return error.ManualEmergency;
}
const key_upper = std.ascii.toUpper(c[0]);
for (entries) |entry| {
if (entry.key == key_upper) {