add js hook for floating title
This commit is contained in:
parent
fac0964053
commit
4f62f8f6dc
|
@ -10,6 +10,7 @@ var PluginHost = {
|
|||
HOOK_ARTICLE_COLLAPSED: 7,
|
||||
HOOK_PARAMS_LOADED: 8,
|
||||
HOOK_RUNTIME_INFO_LOADED: 9,
|
||||
HOOK_FLOATING_TITLE: 10,
|
||||
hooks: [],
|
||||
register: function (name, callback) {
|
||||
if (typeof(this.hooks[name]) == 'undefined')
|
||||
|
|
|
@ -2226,6 +2226,8 @@ function updateFloatingTitle() {
|
|||
if (child.id != $("floatingTitle").getAttribute("rowid")) {
|
||||
$("floatingTitle").setAttribute("rowid", child.id);
|
||||
$("floatingTitle").innerHTML = header.innerHTML;
|
||||
|
||||
PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child);
|
||||
}
|
||||
|
||||
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
|
||||
|
|
Loading…
Reference in New Issue