I created an optimized Heisig Deck. But need help with html to link to ios/android app

Hello just shared this deck: [Heisig RTK 6th Edition [Optimized, 5 Kanji

ankiweb].net/shared/info/1666603203 take out bracket to search. dunno why I can’t link anki website here?

I want to make some improvements regarding opening android/ios applications on opening a link. Would someone help me with this html? As it is a bit beyond me but it is the last thing I want to fix before sharing further.

I would greatly appreciate any help and hope you like the Japanese Kanji Deck. Please let me know any suggestions.

I think I found the solution, with chat gpts help.
Here is the script if anyone is trying to do the same thing in anki.

        var windowsLinkElement = document.querySelector(".windows-link");
        var androidLinkElement = document.querySelector(".android-link");
        var iosLinkElement = document.querySelector(".ios-link");

        if (window.navigator.userAgent.indexOf("Windows") !== -1) {
            windowsLinkElement.innerHTML = '<a href="https://takoboto.jp/?q={{Expression}}">{{Expression}}</a>';
        } else if (window.navigator.userAgent.indexOf("Android") !== -1) {
            androidLinkElement.innerHTML = '<a href="intent:#Intent;package=jp.takoboto;action=jp.takoboto.SEARCH;S.q={{Expression}};end">{{Expression}}</a>';
        } else if (window.navigator.userAgent.indexOf("iPhone") !== -1 || window.navigator.userAgent.indexOf("iPad") !== -1 || window.navigator.userAgent.indexOf("iPod") !== -1) {
            iosLinkElement.innerHTML = '<a href="jp.takoboto://SEARCH?query={{Expression}}">{{Expression}}</a>';

Just replace expression field with desired field you want to display and search