Skip to content

Commit

Permalink
Merge pull request #75 from mozilla/issue/1570390
Browse files Browse the repository at this point in the history
Bug 1570390 - UA override for zhidao.baidu.com, Bug 1570119 - Intervention for teamcoco.com and Bug 1570328 - Intervention for developer.apple.com
  • Loading branch information
denschub committed Aug 12, 2019
2 parents aed8ed3 + 9a5b0f3 commit 1fcce75
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
29 changes: 29 additions & 0 deletions src/data/injections.js
Expand Up @@ -254,6 +254,35 @@ const AVAILABLE_INJECTIONS = [
],
},
},
{
id: "bug1570119",
platform: "desktop",
domain: "teamcoco.com",
bug: "1570119",
contentScripts: {
matches: ["*://teamcoco.com/*"],
css: [
{
file: "injections/css/bug1570119-teamcoco.com-scrollbar-width.css",
},
],
},
},
{
id: "bug1570328",
platform: "android",
domain: "developer.apple.com",
bug: "1570328",
contentScripts: {
matches: ["*://developer.apple.com/*"],
css: [
{
file:
"injections/css/bug1570328-developer-apple.com-transform-scale.css",
},
],
},
},
];

module.exports = AVAILABLE_INJECTIONS;
6 changes: 5 additions & 1 deletion src/data/ua_overrides.js
Expand Up @@ -90,7 +90,11 @@ const AVAILABLE_UA_OVERRIDES = [
domain: "tieba.baidu.com",
bug: "945963",
config: {
matches: ["*://tieba.baidu.com/*", "*://tiebac.baidu.com/*"],
matches: [
"*://tieba.baidu.com/*",
"*://tiebac.baidu.com/*",
"*://zhidao.baidu.com/*",
],
uaTransformer: originalUA => {
return originalUA + " AppleWebKit/537.36 (KHTML, like Gecko)";
},
Expand Down
11 changes: 11 additions & 0 deletions src/injections/css/bug1570119-teamcoco.com-scrollbar-width.css
@@ -0,0 +1,11 @@
/**
* teamcoco.com - a scrollbar at the top covering navigation menu
* Bug #1570119 - https://bugzilla.mozilla.org/show_bug.cgi?id=1570119
*
* The scrollbar is covering navigation items making them unusable.
* There are ::-webkit-scrollbar css rules already applied to the scrollbar,
* hiding it in Chrome. Adding the scrollbar-width: none fixes the issue in Firefox.
*/
.css-bdnz85 {
scrollbar-width: none;
}
@@ -0,0 +1,17 @@
/**
* developer.apple.com - content of the page is shifted to the left
* Bug #1570328 - https://bugzilla.mozilla.org/show_bug.cgi?id=1570328
* WebCompat issue #4070 - https://webcompat.com/issues/4070
*
* The site is relying on zoom property which is not supported by Mozilla,
* see https://bugzilla.mozilla.org/show_bug.cgi?id=390936. Adding a combination
* of transform: scale(1.4), transform-origin and width fixes the issue
*/
@media only screen and (min-device-width: 320px) and (max-device-width: 980px),
(min-device-width: 1024px) and (max-device-width: 1024px) and (min-device-height: 1366px) and (max-device-height: 1366px) and (min-width: 320px) and (max-width: 980px) {
#tocContainer {
transform-origin: 0 0;
transform: scale(1.4);
width: 71.4%;
}
}

0 comments on commit 1fcce75

Please sign in to comment.