add r.ping.mk

also rewrite some parts of contentScript.js a bit to improve the
heuristics of which url is the real content.

also, use window.top.location.href