Implement copy to clipboard on Firefox + Unrelated fixes

Signed-off-by: Zhaofeng Li <hello@zhaofeng.li>