PageSourceSearch

http://www.getchip.net/wp-content/plugins/wp-syntax/js/wp-syntax.js?ver=1.1

js getchip.net collected 2026-09-24 18:24:03 UTC 2,311 bytes, 96 lines download raw bytes

1jQuery(document).ready(function($)
2{
3	$('.wp_syntax').bind(
4	{
5		mouseover: function()
6		{
7			var w = $(this).find('table').outerWidth();
8			var hw = $(document).width() - $(this).offset().left - 20;
9
10			/*
11			 * Test code.
12			 */
13			/*var left, top;
14			left = $(this).offset().left;
15			top = $(this).offset().top;
16
17			$(this)
18				.appendTo('body')
19				.css({
20				'position': 'absolute',
21				'left': left + 'px',
22				'top': top + 'px'
23			});
24			*/
25
26			if(w > $(this).outerWidth()) {
27				// $(this).css({'position':'relative', 'z-index':'9999', 'box-shadow':'5px 5px 5px #888', 'width':(w > hw ? hw : w)+'px'});
28				$(this).css({'position':'relative', 'z-index':'9999', 'width':(w > hw ? hw : w)+'px'});
29			}
30		},
31		mouseout: function()
32		{
33			// $(this).removeAttr('style');
34			$(this).css({'position':'relative', 'z-index':'', 'width':'auto'});
35		},
36		dblclick: function()
37		{
38			//Create text area on top of code on double click
39			//This can make copying of the code easier
40
41			var jthis = $(this);
42			if (!jthis.data('hasTextArea')) {
43				var code = jthis.find(".theCode").html();
44				var ta = $('<textarea spellcheck="false"/>');
45				ta.html(code);
46
47				var pre = jthis.find('.code > pre');
48
49				ta.css({
50					'font-family': pre.css('font-family'),
51					'font-size': pre.css('font-size'),
52					'line-height': pre.css('line-height'),
53					'height': "100%",
54					'width': "100%",
55					'position': 'absolute',
56					'top': 0,
57					'left': 0,
58					'margin': pre.css('margin'),
59					'padding': pre.css('padding'),
60					'border': '0px'
61				});
62
63				ta.css('resize','none');
64				ta.css('outline','none');
65
66				ta.focusout(function(){
67					ta.remove();
68					jthis.data('hasTextArea',false);
69				});
70
71				//readjust position and width if using line numbers
72				var line_numbers = jthis.find(".line_numbers");
73				if (line_numbers.length != 0) {
74					var w = line_numbers.outerWidth();
75					ta.css('left',w+"px");
76					ta.css('width', jthis.width()-w+"px");
77				}
78				//readjust position and height if using caption
79				var caption = jthis.find('caption');
80				if (caption.length != 0) {
81					var h = caption.outerHeight();
82					ta.css('top',h+"px");
83					ta.css('height',jthis.height()-h+"px");
84				}
85
86				ta.appendTo(jthis);
87
88				ta.select();
89				ta.focus();
90
91				jthis.data('hasTextArea',true);
92
93			}
94		}
95	});
96});

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.