@okjavis/nodebb-theme-javis 5.0.6 → 5.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okjavis/nodebb-theme-javis",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "Modern, premium NodeBB theme for JAVIS Community - Extends Harmony with custom styling",
5
5
  "main": "theme.js",
6
6
  "scripts": {
@@ -57,6 +57,9 @@
57
57
  // Fix mobile category dropdown positioning in composer
58
58
  fixMobileComposerCategoryDropdown();
59
59
 
60
+ // Initialize share button handlers
61
+ initShareHandlers();
62
+
60
63
  // Re-initialize carousels when new posts are loaded (infinite scroll, etc.)
61
64
  // Also handle post edits by clearing the processed flag
62
65
  $(window).on('action:posts.loaded action:topic.loaded action:ajaxify.end', function() {
@@ -68,6 +71,7 @@
68
71
  initFeedComposerPromptHandler();
69
72
  initTopicListVoting();
70
73
  initFeedCategoryFilter();
74
+ initShareHandlers();
71
75
  });
72
76
 
73
77
  // Handle post edits - need to re-process the edited post
@@ -928,4 +932,24 @@
928
932
  });
929
933
  }
930
934
 
935
+ /**
936
+ * Initialize share button handlers on feed page
937
+ * Ensures share buttons work on initial load and after ajaxify navigation
938
+ */
939
+ function initShareHandlers() {
940
+ // Only run on feed page
941
+ if (!$('.feed').length) {
942
+ return;
943
+ }
944
+
945
+ // Check if share module is available
946
+ require(['share'], function(share) {
947
+ // Get page title from meta tag or default
948
+ var pageTitle = $('meta[property="og:title"]').attr('content') || document.title || 'JAVIS Community';
949
+
950
+ // Initialize share handlers for all share buttons on the page
951
+ share.addShareHandlers(pageTitle);
952
+ });
953
+ }
954
+
931
955
  })();