PageSourceSearch

https://marc-bloch.ehess.fr/js/jalios/core/jalios-emoji.js

js ehess.fr collected 2026-09-24 08:40:52 UTC 1,852 bytes, 59 lines download raw bytes

1(function ( $ ) {
2
3  if (!$.jalios) { $.jalios = {}; }
4  
5  $.jalios.Emoji = {
6    parse: function(html, options){
7      return parseWithTwemoji(html, options);
8    },
9  
10    defaults : {
11      base: $.jalios.Properties.get('twemoji.base') || ($.jalios.Properties.get('twemoji.use-cdn') ? null : (JcmsJsContext.getBaseUrl() + 'js/lib/twemoji/')),
12      attributes: $.jalios.Properties.get('twemoji.attributes'),
13      ext: $.jalios.Properties.get('twemoji.ext') || twemoji.ext,
14      className: $.jalios.Properties.get('twemoji.className') || twemoji.className,
15      size: $.jalios.Properties.get('twemoji.size') || twemoji.size,
16      folder: $.jalios.Properties.get('twemoji.folder'),
17      callback: $.jalios.Properties.get('twemoji.callback') || function(icon, options, variant) {
18        var excludedIconRegExp = $.jalios.Properties.get('twemoji.excludedIconRegExp') || /^(a9|ae|2122)$/;
19        if (excludedIconRegExp instanceof RegExp && excludedIconRegExp.exec(icon)) {
20           return false;
21        }
22        return ''.concat(options.base, options.size, '/', icon, options.ext);
23      }
24    }
25  };
26  
27  var parseWithTwemoji = function(elm, options) {
28    if (typeof twemoji == 'undefined') {
29      return;
30    }
31
32    var options = $.extend({}, $.jalios.Emoji.defaults, options);
33    
34    return twemoji.parse(elm, options);
35  }
36  
37  var registerTwemoji = function() {
38    if (typeof twemoji == 'undefined') {
39      return;
40    }
41
42    parseWithTwemoji(document.body);
43
44    $(document).on('jalios:refresh', function(event) {
45      var refresh = $.jalios.Event.match(event, 'refresh', 'after');
46      if (!refresh || !refresh.target){ return; }
47      var $refreshElm = $(refresh.target);
48      parseWithTwemoji($refreshElm[0]);
49    });
50  }
51  
52  // Register all 
53  
54  $(document).ready(function(){
55    registerTwemoji();
56  });
57
58}( jQuery ));
59

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.