Menu
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Advertise
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Forums
Medical Marijuana
Medical Marijuana Patients
Canadian Patients
injunction/court case updates
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Members who reacted to message #1167
All
(4)
Like
(4)
Mar 6, 2015
GrowRock
Well-Known Member
·
From
The true land of freedom Canabis city
Messages
2,231
Reaction score
4,483
Points
338
Mar 4, 2015
VIANARCHRIS
Well-Known Member
Messages
5,957
Reaction score
16,123
Points
388
Mar 4, 2015
Flash63
Well-Known Member
Messages
2,130
Reaction score
5,945
Points
338
Mar 4, 2015
doingdishes
Well-Known Member
·
From
Canada
Messages
4,980
Reaction score
7,464
Points
338
Loading…
Forums
Medical Marijuana
Medical Marijuana Patients
Canadian Patients
injunction/court case updates
Top
// Add this to your XenForo extra.js template or include in a separate JS file // 1. Basic Twemoji Implementation $(document).ready(function() { // Load Twemoji library $.getScript("https://unpkg.com/
[email protected]
/dist/twemoji.min.js", function() { // Function to replace native emojis with Twemoji function replaceTwemoji() { // Parse the DOM to replace emojis twemoji.parse(document.body, { folder: 'svg', ext: '.svg', callback: function(icon, options) { // Exclude certain characters if needed switch (icon) { case 'a9': // © copyright case 'ae': // ® registered trademark case '2122': // ™ trademark return false; } return ''.concat(options.base, options.folder, '/', icon, options.ext); } }); } // Initial replacement replaceTwemoji(); // Watch for new content (like when loading new posts) $(document).on('xf:layout', function() { replaceTwemoji(); }); // 2. Modify the XenForo emoji picker to use Twemoji if (XF.EmojiCompleter) { // Override the default emoji completer XF.EmojiCompleter = XF.extend(XF.EmojiCompleter, { insertEmoji: function(shortname) { // Call the original method to insert the emoji this.__super(shortname); // After insertion, replace with Twemoji setTimeout(function() { replaceTwemoji(); }, 10); } }); // Replace emojis in the picker $(document).on('shown.bs.dropdown', '.js-emojiContainer', function() { setTimeout(function() { twemoji.parse(document.querySelector('.js-emojiContainer'), { folder: 'svg', ext: '.svg' }); }, 50); }); } }); }); // 3. Add CSS for proper emoji display $(document).ready(function() { // Add CSS for emoji styling $("