Okay, I wrote up a routine and it seems to be working. It had no bugs (but I didn't test it thoroughly, so it might have bugs I didn't notice.) Hmm, I just noticed it works only with Safari, but that would take only a minute to fix. I've uploaded the program for you below.
Before I change it or fix the part that it only works with Safari, I'd like you to load this macro and test it out yourself. There's a good chance that you can fix it to work with both Safari and Chrome without my assistance. HINT: You don't need to add any new statements, all you need to do is modify any statement that refers to Safari and replace it with a statement that works with "FrontBrowser". If that's too much for you, I'll fix it tomorrow. But to be honest I like to challenge people to try things. And so this is your challenge: "without adding any statements, modify the program below to work with both Safari and Chrome."
Find an Apple URL in the tabs of the Safari browser Macro (v11.0)
Find an Apple URL in the tabs of the Safari browser.kmmacros (4.6 KB)
P.S. I didn't mention it, but the group that this macro was stored in has a flag that says the macro is active only when Safari is active. That's probably the case for you anyway, so you may not need to set that flag yourself. It's just a warning for you.