new hook: aceSetAuthorStyle
parent
eae9faa28c
commit
548f31a46a
|
@ -213,8 +213,22 @@ function Ace2Inner(){
|
||||||
if (!dynamicCSS) {
|
if (!dynamicCSS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var authorSelector = getAuthorColorClassSelector(getAuthorClassName(author));
|
var authorSelector = getAuthorColorClassSelector(getAuthorClassName(author));
|
||||||
|
|
||||||
|
var authorStyleSet = hooks.callAll('aceSetAuthorStyle', {
|
||||||
|
dynamicCSS: dynamicCSS,
|
||||||
|
parentDynamicCSS: parentDynamicCSS,
|
||||||
|
info: info,
|
||||||
|
author: author,
|
||||||
|
authorSelector: authorSelector,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Prevent default behaviour if any hook says so
|
||||||
|
if (_.any(authorStyleSet, function(it) { return it }))
|
||||||
|
{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
{
|
{
|
||||||
dynamicCSS.removeSelectorStyle(authorSelector);
|
dynamicCSS.removeSelectorStyle(authorSelector);
|
||||||
|
|
Loading…
Reference in New Issue