nodebb-plugin-tenor-gif 3.1.2 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js CHANGED
@@ -49,7 +49,7 @@ plugin.registerFormatting = async (payload) => {
49
49
  plugin.query = async (query) => {
50
50
  let { contentFilter, key, limit } = await meta.settings.get('tenor-gif');
51
51
  if (!limit || limit < 1 || limit > 50) {
52
- limit = 12;
52
+ limit = 15;
53
53
  }
54
54
 
55
55
  query = String(query).trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-tenor-gif",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -7,14 +7,7 @@ define('admin/plugins/tenor-gif', ['settings'], function (Settings) {
7
7
  Settings.load('tenor-gif', $('.tenor-gif-settings'));
8
8
 
9
9
  $('#save').on('click', function () {
10
- Settings.save('tenor-gif', $('.tenor-gif-settings'), function () {
11
- app.alert({
12
- type: 'success',
13
- alert_id: 'tenor-gif-saved',
14
- title: 'Settings Saved',
15
- timeout: 5000,
16
- });
17
- });
10
+ Settings.save('tenor-gif', $('.tenor-gif-settings'));
18
11
  });
19
12
  };
20
13
 
@@ -82,6 +82,13 @@ $(document).ready(function () {
82
82
  queryEl.focus();
83
83
  });
84
84
 
85
+ resultsEl.on('wheel', (e) => {
86
+ e.preventDefault();
87
+ resultsEl.get(0).scrollBy({
88
+ left: e.originalEvent.deltaY < 0 ? -50 : 50,
89
+ });
90
+ });
91
+
85
92
  queryEl.on('keyup', function () {
86
93
  if (queryTimeout) {
87
94
  clearTimeout(queryTimeout);
@@ -2,10 +2,11 @@
2
2
  #gif-results {
3
3
  overflow-x: auto;
4
4
  white-space: nowrap;
5
-
5
+ max-height: 80vh;
6
6
  img {
7
7
  cursor: pointer;
8
-
8
+ width: 33%;
9
+ padding: $spacer * 0.25;
9
10
  &:hover {
10
11
  opacity: 0.8;
11
12
  }
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  <div class="mb-3">
30
30
  <label for="limit">Limit results</label>
31
- <input class="form-control" type="number" min="1" max="50" id="limit" placeholder="12" name="limit" />
31
+ <input class="form-control" type="number" min="1" max="50" id="limit" placeholder="15" name="limit" />
32
32
  </div>
33
33
  </div>
34
34
  </div>
@@ -1,4 +1,4 @@
1
1
  <div class="mb-3 d-flex flex-column gap-2">
2
2
  <input type="text" id="gif-query" class="form-control">
3
- <div id="gif-results" class="row row-cols-3 gy-3"></div>
3
+ <div id="gif-results" class="d-flex flex-column flex-wrap"></div>
4
4
  </div>