Closed Bug 1099099 Opened 10 years ago Closed 6 years ago

polisen.se doesn't show "go to mobile version" banner in Firefox OS

Categories

(Web Compatibility :: Site Reports, defect, P5)

All
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hsteen, Unassigned)

References

()

Details

(Whiteboard: [country-se] [clientsniff] [contactready])

polisen.se shows a banner saying "Gå till mobilversionen" at the top if it thinks you're using a mobile browser. This banner is not shown on Firefox OS devices, because they are not correctly detected as smartphones.

This is the code that causes the missing banner:

<div class="mobileRedirectBox" style="display: none">
   <a id="mobileRedirectHyperLink">Gå till mobilversionen</a>
   <input type="hidden" name="ctl00$TopArea$ctl00$mobileStartPageValue" id="ctl00_TopArea_ctl00_mobileStartPageValue" value="http://mobil.polisen.se/DefaultMOBIL.aspx?id=302622" />
</div>
<!--googleon:index-->

<script type="text/javascript">
    $(document).ready(function () {
        var mobilStartPage = $("#ctl00_TopArea_ctl00_mobileStartPageValue").val();

        if (isMobile) {
            $(".mobileRedirectBox").show();
            $("#mobileRedirectHyperLink").attr('href', mobilStartPage);
        } else {
            $(".mobileRedirectBox").hide();
        }
    });

    var isMobile = function () {
        return navigator.userAgent.match(/(iPhone|iPod|Windows Phone|Windows CE|Opera Mini|Palm|Symbian|Portable|Android|BlackBerry)/);
    }();
</script>
Priority: -- → P5
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.