PageSourceSearch

https://oszk.hu/misc/textarea.js

js oszk.hu collected 2026-10-01 09:03:57 UTC 1,263 bytes, 35 lines download raw bytes

1
2Drupal.behaviors.textarea = function(context) {
3  $('textarea.resizable:not(.textarea-processed)', context).each(function() {
4    // Avoid non-processed teasers.
5    if ($(this).is(('textarea.teaser:not(.teaser-processed)'))) {
6      return false;  
7    }
8    var textarea = $(this).addClass('textarea-processed'), staticOffset = null;
9
10    // When wrapping the text area, work around an IE margin bug.  See:
11    // http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout
12    $(this).wrap('<div class="resizable-textarea"><span></span></div>')
13      .parent().append($('<div class="grippie"></div>').mousedown(startDrag));
14
15    var grippie = $('div.grippie', $(this).parent())[0];
16    grippie.style.marginRight = (grippie.offsetWidth - $(this)[0].offsetWidth) +'px';
17
18    function startDrag(e) {
19      staticOffset = textarea.height() - e.pageY;
20      textarea.css('opacity', 0.25);
21      $(document).mousemove(performDrag).mouseup(endDrag);
22      return false;
23    }
24
25    function performDrag(e) {
26      textarea.height(Math.max(32, staticOffset + e.pageY) + 'px');
27      return false;
28    }
29
30    function endDrag(e) {
31      $(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
32      textarea.css('opacity', 1);
33    }
34  });
35};

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.