I’m running Firefox Developer Edition 96.0b9 (64-bit) on macOS Monterey 12.1.
My extension is called Context Search. It’s available on Github here and on AMO here.
I’ve set the User Agent to correspond to the iPhone, but it doesn’t seem to suffice:
'Mozilla/5.0 (iPhone9,3; U; CPU iPhone OS 10_0_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A403 Safari/602.1';
The Google search results are being truncated horizontally instead of fitting in the available width:
In the manifest.json, I used the following code:
"sidebar_action": {
"default_icon": "/icons/context-search.svg",
"default_title": "Search results",
"default_panel": "/sidebar/search_results.html",
"open_at_install": false
},
which has an associated stylesheet containing a viewport meta tag:
`<meta name="viewport" content="width=430, initial-scale=1.0">`
BUT, I wonder if search_results.html doesn’t get overwritten by:
if (contextsearch_openSearchResultsInSidebar) {
browser.sidebarAction.setPanel({ panel: targetUrl });
browser.sidebarAction.setTitle({ title: 'Search results' });
return;
}
because targetUrl doesn’t have any viewport associated with it!
It’s not all clear to me!