Open
Bug 1385206
Opened 8 years ago
Updated 8 days ago
create UA override for rakuten.co.jp on Firefox Android
Categories
(Web Compatibility :: Interventions, enhancement)
Tracking
(Not tracked)
REOPENED
People
(Reporter: karlcow, Assigned: karlcow)
References
()
Details
(Keywords: webcompat:needs-contact, webcompat:needs-sitepatch, Whiteboard: [webcompat:sitepatch-applied])
Attachments
(2 files, 1 obsolete file)
When accessing rakuten.co.jp on Firefox Android, we receive a desktop version.
http://www.rakuten.co.jp/
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
We need to modify https://hg.mozilla.org/mozilla-central/raw-file/tip/mobile/android/app/ua-update.json.in
Current:
http GET http://www.rakuten.co.jp/ 'User-Agent:Mozilla/5.0 (Android 4.4.4; Mobile; rv:54.0) Gecko/54.0 Firefox/54.0' | grep rakutenmobile
Chrome:
http GET http://www.rakuten.co.jp/ 'User-Agent:Mozilla/5.0 (Linux; Android 4.4.4; en-us; Nexus 5 Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36' | grep rakutenmobile
<li><a href="http://ac.ebis.ne.jp/tr_set.php?argument=ZMhPE4GP&ai=rgp_ichi_160826_01" onclick="this.href='http://rd.rakuten.co.jp/s/?R2=http%3A%2F%2Fac.ebis.ne.jp%2Ftr_set.php%3Fargument%3DZMhPE4GP%26ai%3Drgp_ichi_160826_01&D2=3.22135.139691.881641.32198472&C3=7a47b4eeb1fbb649683dcf082168675c4fcde836'"><img src="https://r.r10s.jp/com/img/home/smart/top/contents/new/20160830_rakutenmobile_200x200.jpg" width="100" height="100" alt="rakutenmobile"></a></li>
Minimal Change:
Just keeping Gecko, but removing Firefox/54.0 in there does the job, instead of a full blown Chrome UA.
http GET http://www.rakuten.co.jp/ 'User-Agent:Mozilla/5.0 (Android 4.4.4; Mobile; rv:54.0) Gecko/54.0' | grep rakutenmobile
<li><a href="http://ac.ebis.ne.jp/tr_set.php?argument=ZMhPE4GP&ai=rgp_ichi_160826_01" onclick="this.href='http://rd.rakuten.co.jp/s/?R2=http%3A%2F%2Fac.ebis.ne.jp%2Ftr_set.php%3Fargument%3DZMhPE4GP%26ai%3Drgp_ichi_160826_01&D2=3.22135.139691.881641.32198472&C3=7a47b4eeb1fbb649683dcf082168675c4fcde836'"><img src="https://r.r10s.jp/com/img/home/smart/top/contents/new/20160830_rakutenmobile_200x200.jpg" width="100" height="100" alt="rakutenmobile"></a></li>
Assignee | ||
Comment 3•8 years ago
|
||
Comment hidden (mozreview-request) |
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8891263 [details]
Bug 1385206 - Adds rakuten.co.jp UA override;
https://reviewboard.mozilla.org/r/162464/#review167812
::: mobile/android/app/ua-update.json.in:18
(Diff revision 1)
> // bug 1338260, directv.com
> "directv.com": "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36",
> // bug 1310951, m.canadiantire.ca
> - "m.canadiantire.ca": "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36"
> + "m.canadiantire.ca": "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36",
> + // bug 1385206, rakuten.co.jp
> + "rakuten.co.jp": "Firefox.+;;"
Are you trying to only send the `Firefox.+;;` string?
If you're trying to do what https://bugzilla.mozilla.org/show_bug.cgi?id=1385206#c1 says, shouldn't it be something like:
`"Firefox.+$#"` (That should translate to something like:
```
"Mozilla/5.0 (Android 6.0.1; Mobile; rv:52.0) Gecko/52.0 Firefox/52.0".replace(new RegExp("Firefox.+$", "g"), "")
```
Comment 6•8 years ago
|
||
(In reply to Karl Dubost :karlcow from comment #2)
> mike, would you prefer the full Chrome UA?
If removing the Firefox token gets the job done, that sounds good.
Flags: needinfo?(miket)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8891826 [details]
Bug 1385206 - Adds rakuten.co.jp UA override;
https://reviewboard.mozilla.org/r/162856/#review168350
r=me (assuming you built and tested this locally - ping me on irc if you're not sure how to do that)
Can you please squash the first two ua-update.json commits into one?
Attachment #8891826 -
Flags: review?(miket) → review+
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8891827 [details]
Bug 1385206 - Documents the syntax for this file;
https://reviewboard.mozilla.org/r/162858/#review168348
Attachment #8891827 -
Flags: review?(miket) → review+
Assignee | ||
Comment 11•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8891826 [details]
Bug 1385206 - Adds rakuten.co.jp UA override;
https://reviewboard.mozilla.org/r/162856/#review168350
```
371462[tip] 15627ca26412 2017-07-31 06:53 +0900 kdubost
Documents the syntax for this file; r?miketaylr
371461:371459 e21966841291 2017-07-31 06:47 +0900 kdubost
Bug 1385206 - Adds rakuten.co.jp UA override; r?miketaylr
371460 ce178f748a57 2017-07-28 18:03 +0900 kdubost
Bug 1385206 - Adds rakuten.co.jp UA override; r?miketaylr
371459 5845151f1a2c 2017-07-28 09:22 +0200 cbook
Backed out changeset 33172a0a496a (bug 1356271) for broken tests after the backout of bug 1351148 on try
```
Now I need to learn how to squash 371460 and 371461 together with hg. :) I started a rebase which seems to have been taken into account `371461:371459` but not sure how to finish it. I will dig documentation.
As it is my first use of reviewboard. I see the menu for Automation. Try a build. I guess I can use that for testing the build. I tested the user agent on desktop responsive mode with the right syntax. and it was working.
I want to test something else too before we push to mozilla-central.
Assignee | ||
Comment 12•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8891826 [details]
Bug 1385206 - Adds rakuten.co.jp UA override;
https://reviewboard.mozilla.org/r/162856/#review168350
> Fixup commits aren’t appropriate for submitting to MozReview (they should be rewritten/folded/squashed before submission).
https://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview/commits.html
I wonder if I should abandon this one and submit a new review. Probably would be simpler than squashing.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8891263 -
Attachment is obsolete: true
Attachment #8891263 -
Flags: review?(miket)
Assignee | ||
Comment 15•8 years ago
|
||
ok mike,
I check if on the JS side if we would create issues. And it seems not. I think we can move on.
(tested the UA on a desktop with responsive design and the new UA).
Comment 16•8 years ago
|
||
Cool, feel free to land (there's an "Autoland" feature in ReviewBoard...)
Assignee | ||
Comment 17•8 years ago
|
||
according to https://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview/autoland.html you need L3 to autoland. :)
Comment 18•8 years ago
|
||
hg error in cmd: hg push -r tip ssh://hg.mozilla.org/integration/autoland: pushing to ssh://hg.mozilla.org/integration/autoland
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 2 changes to 1 files
remote:
remote:
remote: ************************** ERROR ****************************
remote: Rev 3aca42447712 needs "Bug N" or "No bug" in the commit message.
remote: Karl Dubost <kdubost@mozilla.com>
remote: Documents the syntax for this file; r=miketaylr
remote:
remote: MozReview-Commit-ID: Kbr3BNIx9Ky
remote: *************************************************************
remote:
remote:
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.c_commitmessage hook failed
abort: push failed on remote
Comment hidden (mozreview-request) |
Comment 20•8 years ago
|
||
Pushed by mitaylor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b365f7994563
Adds rakuten.co.jp UA override; r=miketaylr
https://hg.mozilla.org/integration/autoland/rev/82ed0c46ac34
Documents the syntax for this file; r=miketaylr
Comment 21•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b365f7994563
https://hg.mozilla.org/mozilla-central/rev/82ed0c46ac34
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 22•6 years ago
|
||
RDM vs Real Device:
http://prntscr.com/kopcq2
Updated•6 years ago
|
Whiteboard: [sitepatch-built]
Updated•4 years ago
|
Whiteboard: [sitepatch-built] → [webcompat:sitepatch-applied]
Updated•10 months ago
|
Component: Tooling & Investigations → Interventions
Comment 23•8 days ago
|
||
Reopening this one, since we're now tracking the status of webcompat issues with interventions differently.
Status: RESOLVED → VERIFIED
Updated•8 days ago
|
Status: VERIFIED → REOPENED
Keywords: webcompat:needs-contact,
webcompat:needs-sitepatch
Resolution: FIXED → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•