mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
cssManager top is not used, so drop it
This commit is contained in:
parent
9d9b7b7b47
commit
a557f2414e
2 changed files with 4 additions and 15 deletions
|
@ -166,12 +166,10 @@ function Ace2Inner(){
|
||||||
}
|
}
|
||||||
|
|
||||||
var dynamicCSS = null;
|
var dynamicCSS = null;
|
||||||
var dynamicCSSTop = null;
|
|
||||||
|
|
||||||
function initDynamicCSS()
|
function initDynamicCSS()
|
||||||
{
|
{
|
||||||
dynamicCSS = makeCSSManager("dynamicsyntax");
|
dynamicCSS = makeCSSManager("dynamicsyntax");
|
||||||
dynamicCSSTop = makeCSSManager("dynamicsyntax", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var changesetTracker = makeChangesetTracker(scheduler, rep.apool, {
|
var changesetTracker = makeChangesetTracker(scheduler, rep.apool, {
|
||||||
|
@ -214,7 +212,6 @@ function Ace2Inner(){
|
||||||
if (dynamicCSS)
|
if (dynamicCSS)
|
||||||
{
|
{
|
||||||
dynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
|
dynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
|
||||||
dynamicCSSTop.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -232,23 +229,18 @@ function Ace2Inner(){
|
||||||
|
|
||||||
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||||
getAuthorClassName(author)));
|
getAuthorClassName(author)));
|
||||||
var authorStyleTop = dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
|
|
||||||
getAuthorClassName(author)));
|
|
||||||
var anchorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
var anchorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||||
getAuthorClassName(author))+' > a')
|
getAuthorClassName(author))+' > a')
|
||||||
|
|
||||||
// author color
|
// author color
|
||||||
authorStyle.backgroundColor = bgcolor;
|
authorStyle.backgroundColor = bgcolor;
|
||||||
authorStyleTop.backgroundColor = bgcolor;
|
|
||||||
|
|
||||||
// text contrast
|
// text contrast
|
||||||
if(colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5)
|
if(colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5)
|
||||||
{
|
{
|
||||||
authorStyle.color = '#ffffff';
|
authorStyle.color = '#ffffff';
|
||||||
authorStyleTop.color = '#ffffff';
|
|
||||||
}else{
|
}else{
|
||||||
authorStyle.color = null;
|
authorStyle.color = null;
|
||||||
authorStyleTop.color = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// anchor text contrast
|
// anchor text contrast
|
||||||
|
|
|
@ -20,15 +20,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function makeCSSManager(emptyStylesheetTitle, top)
|
function makeCSSManager(emptyStylesheetTitle)
|
||||||
{
|
{
|
||||||
|
|
||||||
function getSheetByTitle(title, top)
|
function getSheetByTitle(title)
|
||||||
{
|
{
|
||||||
if(top)
|
var allSheets = document.styleSheets;
|
||||||
var allSheets = window.parent.parent.document.styleSheets;
|
|
||||||
else
|
|
||||||
var allSheets = document.styleSheets;
|
|
||||||
|
|
||||||
for (var i = 0; i < allSheets.length; i++)
|
for (var i = 0; i < allSheets.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +38,7 @@ function makeCSSManager(emptyStylesheetTitle, top)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var browserSheet = getSheetByTitle(emptyStylesheetTitle, top);
|
var browserSheet = getSheetByTitle(emptyStylesheetTitle);
|
||||||
|
|
||||||
function browserRules()
|
function browserRules()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue