mirror of
https://github.com/Mibew/emoji-plugin.git
synced 2025-01-22 09:30:33 +03:00
Use relative URL for assets as default
This commit is contained in:
parent
659874df6a
commit
068ce8740c
13
Plugin.php
13
Plugin.php
@ -83,10 +83,8 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
|
|||||||
*/
|
*/
|
||||||
public function attachJSFiles(&$args)
|
public function attachJSFiles(&$args)
|
||||||
{
|
{
|
||||||
$request = $args['request'];
|
if ($this->isAppropriatePage($args['request'])) {
|
||||||
|
$base_path = $this->getFilesPath();
|
||||||
if ($this->isAppropriatePage($request)) {
|
|
||||||
$base_path = $request->getBasePath() . '/' . $this->getFilesPath();
|
|
||||||
$args['js'][] = $base_path . '/components/es5-shim/es5-shim.js';
|
$args['js'][] = $base_path . '/components/es5-shim/es5-shim.js';
|
||||||
$args['js'][] = $base_path . '/components/emojify.js/emojify.js';
|
$args['js'][] = $base_path . '/components/emojify.js/emojify.js';
|
||||||
$args['js'][] = $base_path . '/js/plugin.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)
|
public function attachCssFiles(&$args)
|
||||||
{
|
{
|
||||||
$request = $args['request'];
|
if ($this->isAppropriatePage($args['request'])) {
|
||||||
|
$args['css'][] = $this->getFilesPath() . '/css/styles.css';
|
||||||
if ($this->isAppropriatePage($request)) {
|
|
||||||
$args['css'][] = $request->getBasePath() . '/' . $this->getFilesPath()
|
|
||||||
. '/css/styles.css';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user