We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有时候我们需要根据用户的特定需求,可能需要定制一下silentor,提供一些hooks便于定制开发,而不是改源代码.
例如: 用户加载完main-page 的内容后(主页有可能是索引页,因而不显示评论),需要决定是否显示评论框.
before-load-sidebar-page
loaded-sidebar-page
before-load-main-page
loaded-main-page
before-load-main-page-footer
loaded-main-page-footer
page-not-found
data.selector
data.path
src/extension/pluginName/main.js
;(function($) { 'use strict'; $(window).on('loaded-sidebar-page', function() { // console.log('loaded-sidebar-page') }); $(window).on('loaded-main-page', function() { // your code }); $(window).on('loaded-main-page-footer', function() { // console.log('loaded-main-page-footer') }); $(window).on('page-not-found', function(evt, data){ // console.log('page-not-found') }); $(window).on('before-load-sidebar-page', function(evt, data){ // console.log('before-load-sidebar-page') }); $(window).on('before-load-main-page', function(evt, data){ // console.log('before-load-main-page') }); $(window).on('before-load-main-page-footer', function(evt, data){ // console.log('before-load-main-page-footer') }); //。。。。。。 })(jQuery);
The text was updated successfully, but these errors were encountered:
7b1b626
7948cd0
No branches or pull requests
有时候我们需要根据用户的特定需求,可能需要定制一下silentor,提供一些hooks便于定制开发,而不是改源代码.
例如: 用户加载完main-page 的内容后(主页有可能是索引页,因而不显示评论),需要决定是否显示评论框.
Hooks
before-load-sidebar-page
loaded-sidebar-page
before-load-main-page
loaded-main-page
before-load-main-page-footer
loaded-main-page-footer
page-not-found
, 额外传入的data:data.selector
要加载的selectordata.path
: md路径(加载页路径)Usage
src/extension/pluginName/main.js
The text was updated successfully, but these errors were encountered: