1!function ($) { 2 3 "use strict"; // jshint ;_; 4 5 var Readlist = function (element, options) { 6 7 this.init('readlist', element, options); 8 9 }; 10 11 12 Readlist.prototype = { 13 14 constructor: Readlist, 15 16 init: function (type, element, options) { 17 18 19 this.return = options.return; 20 this.login = options.modal; 21 this.element = $(element); 22 $(element).on('click', function (event) { 23 24 event.preventDefault(); 25 26 this.readthis(options.id); 27 28 }.bind(this)); 29 30 }, 31 32 readthis: function (id) { 33 34 var $data = {}; 35 36 $data['id'] = id; 37 // $data['option'] = 'com_readlist'; 38 // $data['task'] = 'readthis'; 39 40 $.ajax({ 41 data: $data, 42 url: '?option=com_readlist&task=readthis', 43 type: 'post', 44 dataType: 'json', 45 beforeSend: function () { 46 47 this.element.prepend($('<i class="fa fa-spin fa-spinner"></i>', { 48 49 css: {'margin-right': '5px'} 50 51 })); 52 53 }.bind(this), 54 success: function (data, x, y) { 55 this.element.find('i').remove(); 56 if (data.state) { 57 58 this.element.html(data.text); 59 60 } else { 61 62 jQuery(this.login).modal('show'); 63 $('#return-url').val(this.return); 64 } 65 66 }.bind(this) 67 68 }) 69 70 } 71 72 }; 73 74 75 $.fn.readlist = function (option) { 76 77 return this.each(function () { 78 79 var $this = $(this) 80 , data = $this.data('readlist') 81 , options = $.extend({}, $.fn.readlist.defaults, typeof option == 'object' && option); 82 if (!data) $this.data('readlist', (data = new Readlist(this, options))); 83 84 }); 85 86 }; 87 88 $.fn.readlist.Constructor = Readlist; 89 90 $.fn.readlist.defaults = {}; 91 92 window.addEventListener('DOMContentLoaded', () => { 93 94 $('[data-readlisting="true"]').each(function () { 95 96 var $this = $(this); 97 98 $this.readlist($this.data()); 99 100 }); 101 102 }); 103 104 105}(window.jQuery);
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.