Item Info Injector to inject hyperlinks to reference websites should be simple to make.
You might also use Kanjidic in the script. JSON from jmdict-simplified should be simple to parse and put in the script.
You might use Yomitan Wiktionary dictionary file, or just Wry dump, but I don’t think it would be as ready-made for Pinyin reading as Kanjidic JSON.
Truthfully, equivalent Hanzi could be a little more complex to find sometimes, as they are not necessarily on the same unicode points, but Wiktionary should have that covered.