First commit

master
Chimo 6 years ago
commit 7a48e7bf2a
  1. 2
      .gitignore
  2. 39
      EmojisPlugin.php
  3. 8
      js/gs-emojis.js
  4. 15
      package.json

2
.gitignore vendored

@ -0,0 +1,2 @@
node_modules/

@ -0,0 +1,39 @@
<?php
if (!defined('GNUSOCIAL')) {
exit(1);
}
class EmojisPlugin extends Plugin {
const VERSION = '0.0.1';
function onEndShowScripts($action) {
$action->script($this->path('node_modules/emojionearea/dist/emojionearea.min.js'));
$action->element('script', array('src' => $this->path('js/gs-emojis.js')));
}
function onEndShowStyles($action) {
$action->cssLink($this->path('node_modules/emojionearea/dist/emojionearea.min.css'));
}
/**
* Plugin version data
*
* @param array &$versions array of version data
*
* @return value
*/
function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'Emojis',
'version' => self::VERSION,
'author' => 'Chimo',
'homepage' => 'https://github.com/chimo/gs-emojis',
'description' =>
// TRANS: Plugin description.
_m('Add emojis to your GNU social notices via emoji-picker or :shortnames:'));
return true;
}
}

@ -0,0 +1,8 @@
(function () {
"use strict";
$( ".notice_data-text" ).emojioneArea({
pickerPosition: "left"
});
}());

@ -0,0 +1,15 @@
{
"name": "gs-emojis",
"version": "0.0.1",
"description": "Add emojis to your GNU social notices via emoji-picker or :shortnames:",
"dependencies": {
"emojionearea": "^3.1.5"
},
"repository": {
"type": "git",
"url": "git+https://github.com/chimo/gs-emojis.git"
},
"author": "chimo",
"license": "AGPL-1.0"
}