Merge pull request #528 from matrix-org/rav/fix_tinting
Fix room tinting
This commit is contained in:
commit
974e4c05c8
1 changed files with 15 additions and 2 deletions
|
@ -90,7 +90,20 @@ function calcCssFixups() {
|
||||||
// See also #vector:matrix.org/$145357669685386ebCfr:matrix.org
|
// See also #vector:matrix.org/$145357669685386ebCfr:matrix.org
|
||||||
// ...except some browsers apparently return stylesheets without
|
// ...except some browsers apparently return stylesheets without
|
||||||
// hrefs, which we have no choice but ignore right now
|
// hrefs, which we have no choice but ignore right now
|
||||||
if (ss.href && !ss.href.endsWith("/bundle.css")) continue;
|
|
||||||
|
// XXX seriously? we are hardcoding the name of vector's CSS file in
|
||||||
|
// here?
|
||||||
|
//
|
||||||
|
// Why do we need to limit it to vector's CSS file anyway - if there
|
||||||
|
// are other CSS files affecting the doc don't we want to apply the
|
||||||
|
// same transformations to them?
|
||||||
|
//
|
||||||
|
// Iterating through the CSS looking for matches to hack on feels
|
||||||
|
// pretty horrible anyway. And what if the application skin doesn't use
|
||||||
|
// Vector Green as its primary color?
|
||||||
|
|
||||||
|
if (ss.href && !ss.href.match(/\/bundle.*\.css$/)) continue;
|
||||||
|
|
||||||
if (!ss.cssRules) continue;
|
if (!ss.cssRules) continue;
|
||||||
for (var j = 0; j < ss.cssRules.length; j++) {
|
for (var j = 0; j < ss.cssRules.length; j++) {
|
||||||
var rule = ss.cssRules[j];
|
var rule = ss.cssRules[j];
|
||||||
|
|
Loading…
Reference in a new issue