diff --git a/GoogleAnalytics/Plugin.php b/GoogleAnalytics/Plugin.php new file mode 100644 index 0000000..e52556f --- /dev/null +++ b/GoogleAnalytics/Plugin.php @@ -0,0 +1,68 @@ +footer = array('GoogleAnalytics_Plugin', 'render'); + } + + /** + * 禁用插件方法,如果禁用失败,直接抛出异常 + * + * @static + * @access public + * @return void + * @throws Typecho_Plugin_Exception + */ + public static function deactivate(){} + + /** + * 获取插件配置面板 + * + * @access public + * @param Typecho_Widget_Helper_Form $form 配置面板 + * @return void + */ + public static function config(Typecho_Widget_Helper_Form $form) + { + /** 分类名称 */ + $account = new Typecho_Widget_Helper_Form_Element_Text('account', NULL, 'UA-XXXXXXX-X', _t('Google Analytics 帐号')); + $form->addInput($account); + } + + /** + * 个人用户的配置面板 + * + * @access public + * @param Typecho_Widget_Helper_Form $form + * @return void + */ + public static function personalConfig(Typecho_Widget_Helper_Form $form){} + + /** + * 插件实现方法 + * + * @access public + * @return void + */ + public static function render() + { + $account = Typecho_Widget::widget('Widget_Options')->plugin('GoogleAnalytics')->account; + echo ""; + } +} \ No newline at end of file diff --git a/LaTex/latex.js b/LaTex/latex.js index bafc138..a9ecf44 100644 --- a/LaTex/latex.js +++ b/LaTex/latex.js @@ -5,7 +5,7 @@ var node = latex[i]; var latex_image = document.createElement("img"); latex_image.src = "http://latex.codecogs.com/png.latex?"+ node.innerHTML; - + // replace with image var parent = node.parentNode; parent.insertBefore(latex_image, node); parent.removeChild(node);