Sha256: bfe6d5b307fd7cdb128a2de5afd6e2385fe9226a671ebc724be172090fe4d38f

Contents?: true

Size: 1.62 KB

Versions: 71

Compression:

Stored size: 1.62 KB

Contents

/*!
 * Scripts for the demo pages on the jScrollPane website.
 *
 * You do not need to include this script or use it on your site.
 *
 * Copyright (c) 2010 Kelvin Luck
 * Dual licensed under the MIT or GPL licenses.
 */

$(function()
{
	// Copy the pages javascript sourcecode to the display block on the page for easy viewing...
	var sourcecodeDisplay = $('#sourcecode-display');
	if (sourcecodeDisplay.length) {
		sourcecodeDisplay.empty().append(
			$('<code />').append(
				$('<pre />').html(
					$('#sourcecode').html().replace(/\n\t\t\t/gm, '\n').replace('>', '&gt;').replace('<', '&lt;')
				)
			)
		);
		$('#css-display').empty().append(
			$('<code />').append(
				$('<pre />').html(
					$('#page-css').html().replace(/\n\t\t\t/gm, '\n')
				)
			)
		);
	}
});

// It seems some people copy this file and put it on their sites despite the message at the top
// So let's make sure they don't end up in my stats...
if (window.location.hostname == 'jscrollpane.kelvinluck.com') { 
	// Google analytics tracking code for demo site 
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-17828883-1']);
	_gaq.push(['_trackPageview']);
	
	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
} else if(window.location.protocol == 'file:' || window.location.hostname == 'localhost') {
	// Allow local testing without annoying alerts
} else {
	alert('Do not include demo.js on your site!');
}

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
roda-component-0.1.73 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.72 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.71 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.70 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.69 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.68 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.67 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.66 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.65 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.64 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.63 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.62 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.61 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.60 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.59 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.58 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.57 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.56 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.55 test/dummy/public/bower/jScrollPane/script/demo.js
roda-component-0.1.54 test/dummy/public/bower/jScrollPane/script/demo.js