On Fri, Oct 30, 2020 at 11:34 AM @lbutlr <kremels@kreme.com> wrote:
On 30 Oct 2020, at 11:57, Aki Tuomi <aki.tuomi@open-xchange.com> wrote:
> But I think the sed here is missing 's' from start, so this does not actually do anything...

Copy/paste/edit error. The s is there in the file.

darkmode.sh:
#!/bin/sh
echo $1 | sed -e 's|</head>|<style>* {color:white !important; background-color: black !important; } </style></head>|'

I am not sure about the $1. I think filter just pipes the message (or part of the message.

I will see what happens without the echo I suppose.

Nope, still the same.

  32:   starting `:contains' match with `i;ascii-casemap' comparator:
  32:   matching value `<!DOCTYPE html><html lang="en"><head><title>29-Oct-2020 ""</title> <style>?? ...'
  32:     with key `</head>' => 1
  32:   finishing match with result: matched
  32: jump if result is false
  32:   not jumping
  34: filter action
  34:   execute program `darkmode.sh'
  34:   [[EXECUTION ABORTED]]




Not a fix (just a debug step), but I'm curious what happens if you explicitly set 'exit 0' at the end of the shell script.