PageSourceSearch

https://deepskyblue-caribou-160882.hostingersite.com/media/system/js/caption.js

js deepskyblue-caribou-160882.hostingersite.com collected 2026-10-03 04:22:01 UTC 1,776 bytes, 61 lines download raw bytes

1/**
2* @version		$Id: modal.js 5263 2006-10-02 01:25:24Z webImagery $
3* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
4* @license		GNU/GPL, see LICENSE.php
5* Joomla! is free software. This version may have been modified pursuant
6* to the GNU General Public License, and as distributed it includes or
7* is derivative of works licensed under the GNU General Public License or
8* other free or open source software licenses.
9* See COPYRIGHT.php for copyright notices and details.
10*/
11
12/**
13 * JCaption javascript behavior
14 *
15 * Used for displaying image captions
16 *
17 * @author		Johan Janssens <[email protected]>
18 * @package		Joomla
19 * @since		1.5
20 * @version     1.0
21 */
22var JCaption = new Class({
23	initialize: function(selector)
24	{
25		this.selector = selector;
26
27		var images = $$(selector);
28		images.each(function(image){ this.createCaption(image); }, this);
29	},
30
31	createCaption: function(element)
32	{
33		var caption   = document.createTextNode(element.title);
34		var container = document.createElement("div");
35		var text      = document.createElement("p");
36		var width     = element.getAttribute("width");
37		var align     = element.getAttribute("align");
38
39		if(!width) {
40			width = element.width;
41		}
42
43		text.appendChild(caption);
44		element.parentNode.insertBefore(container, element);
45		container.appendChild(element);
46		if ( element.title != "" ) {
47			container.appendChild(text);
48		}
49		container.className   = this.selector.replace('.', '_');
50		container.className   = container.className + " " + align;
51		container.setAttribute("style","float:"+align);
52		container.style.width = width + "px";
53
54	}
55});
56
57document.caption = null
58window.addEvent('load', function() {
59  var caption = new JCaption('img.caption')
60  document.caption = caption
61});

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.