PageSourceSearch

https://danlawtechnologies.com/public/assets/plugins/switcher/js/dmss.js

js danlawtechnologies.com collected 2026-10-10 02:38:01 UTC 2,517 bytes, 81 lines download raw bytes

1// Swticher Cookie Base
2/**
3 * Styleswitch stylesheet switcher built on jQuery
4 * Under an Attribution, Share Alike License
5 * By Kelvin Luck ( http://www.kelvinluck.com/ )
6 * Thanks for permission! 
7 **/
8(function($){
9	$(document).ready(function() {
10		$('.styleswitch').click(function(){
11			switchStylestyle(this.getAttribute("data-switchcolor"));
12			return false;
13		});
14		var c = readCookie('style');
15		if (c) switchStylestyle(c);
16	});
17	function switchStylestyle(styleName){
18		$('link[rel*=style][title]').each(function(i){
19			this.disabled = true;
20			if (this.getAttribute('title') == styleName) this.disabled = false;
21		});
22		createCookie('style', styleName, 365);
23	}
24})(jQuery);
25function createCookie(name,value,days){
26	if (days){
27		var date = new Date();
28		date.setTime(date.getTime()+(days*24*60*60*1000));
29		var expires = "; expires="+date.toGMTString();
30	}
31	else var expires = "";
32	document.cookie = name+"="+value+expires+"; path=/";
33}
34function readCookie(name){
35	var nameEQ = name + "=";
36	var ca = document.cookie.split(';');
37	for(var i=0;i < ca.length;i++){
38		var c = ca[i];
39		while (c.charAt(0)==' ') c = c.substring(1,c.length);
40		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
41	}
42	return null;
43}
44function eraseCookie(name){
45	createCookie(name,"",-1);
46}
47
48// DEMO Swticher Base
49jQuery('.demo_changer .demo-icon').click(function(){
50	if(jQuery('.demo_changer').hasClass("active")){
51		jQuery('.demo_changer').animate({"left":"-70px"},function(){
52			jQuery('.demo_changer').toggleClass("active");
53		});						
54	}else{
55		jQuery('.demo_changer').animate({"left":"0px"},function(){
56			jQuery('.demo_changer').toggleClass("active");
57		});			
58	} 
59});
60
61// Selector (MODULE #4)
62$(window).on('load', function () {
63	$('.selectpicker').selectpicker({
64		'selectedText': 'cat'
65	});
66});
67
68// Selector (MODULE #2)
69jQuery('.demo_changer .PatternChanger a').click(function(){
70	var bgBgCol = jQuery(this).attr('href');
71	jQuery('.demo_changer .PatternChanger a').removeClass('current');
72	jQuery('body').css({backgroundColor:'#ffffff'});
73	jQuery(this).addClass('current');
74	jQuery('body').css({backgroundImage:'url(' + bgBgCol + ')'});
75	if (jQuery(this).hasClass('bg_t')){
76		jQuery('body').css({backgroundRepeat:'repeat', backgroundPosition:'50% 0', backgroundAttachment:'scroll'});
77	} else {
78		jQuery('body').css({backgroundRepeat:'repeat', backgroundPosition:'50% 0', backgroundAttachment:'scroll'});
79	}
80	return false;
81});

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.