diff --git a/Plugin.php b/Plugin.php index 44123ef..19a3c71 100644 --- a/Plugin.php +++ b/Plugin.php @@ -83,10 +83,8 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi */ public function attachJSFiles(&$args) { - $request = $args['request']; - - if ($this->isAppropriatePage($request)) { - $base_path = $request->getBasePath() . '/' . $this->getFilesPath(); + if ($this->isAppropriatePage($args['request'])) { + $base_path = $this->getFilesPath(); $args['js'][] = $base_path . '/components/es5-shim/es5-shim.js'; $args['js'][] = $base_path . '/components/emojify.js/emojify.js'; $args['js'][] = $base_path . '/js/plugin.js'; @@ -100,11 +98,8 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi */ public function attachCssFiles(&$args) { - $request = $args['request']; - - if ($this->isAppropriatePage($request)) { - $args['css'][] = $request->getBasePath() . '/' . $this->getFilesPath() - . '/css/styles.css'; + if ($this->isAppropriatePage($args['request'])) { + $args['css'][] = $this->getFilesPath() . '/css/styles.css'; } }