PageSourceSearch

https://poweredbyh4c.org/Assets/emojis/js/emoji_custom.js

js poweredbyh4c.org collected 2026-10-08 19:55:17 UTC 1,830 bytes, 73 lines download raw bytes

1$(function () {
2    initEmoji();
3})
4
5var emojiBoxes = [];
6
7const options = {
8    formatHref: {
9        mention: (href) => 'javascript:getUrl("' + href + '", null)'
10    }
11}
12
13function initiateMentionsInput(input) {
14    $(input).mentionsInput({
15        onDataRequest: function (mode, query, callback) {
16            $.post("/api/usernames", { term: query }, function (responseData) {
17                console.log(responseData);
18                responseData = _.filter(responseData, function (item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 });
19                callback.call(this, responseData);
20            });
21        }
22    });
23}
24
25function initiateEmojiInput(input) {
26    $(input).emojiPicker({
27        width: '200',
28        height: '350',
29        position: 'right',
30        fadeTime: 100,
31        iconColor: 'black',
32        iconBackgroundColor: 'transparent',
33        recentCount: 36,
34        emojiSet: 'apple',
35        container: 'body',
36        button: true
37    });
38}
39
40function initEmoji() {
41    $('.comments-body, .reply-body').linkify(options);
42
43    $('.message-input').each(function (i, obj) {
44        
45        var id = $(this).attr('id');
46
47        if (emojiBoxes.includes(id) === false) {
48
49            initiateMentionsInput('#' + id);
50
51            initiateEmojiInput('#' + id);
52
53            emojiBoxes.push(id);
54        }
55    });
56}
57
58function reinitEmoji(id) {
59    $('.comments-body, .reply-body').linkify(options);
60
61    initiateMentionsInput('#' + id);
62
63    initiateEmojiInput('#' + id);
64
65    if (emojiBoxes.includes(id) === false) emojiBoxes.push(id);
66}
67
68function getUrl(name) {
69    name = name.replace('/', '');
70    $.post('/api/userid', { term: name }, function (id) {
71        window.location.href = "/users/" + id;
72    })
73}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.