PageSourceSearch

https://www.icetourist.is/wp-content/themes/exploore/assets/public/js/slzexploore-ajax.js?ver=2.0

js icetourist.is collected 2026-10-02 05:10:15 UTC 2,368 bytes, 106 lines download raw bytes

1;(function($) {
2	"use strict";
3	$.fn.slzexploore = function(){};
4	var $this = $.fn.slzexploore;
5
6	/**
7	 * jQuery.fn.slzexploore.ajax(['setting.Setting_Main', 'html'], [[],[]], function(data){})
8	 */
9	$.fn.slzexploore.ajax = function( module, params, fun ) {
10		if( ! ajaxurl ) {
11			return;
12		}
13
14		jQuery.ajax({
15			'type'  : 'POST',
16			'url'   : ajaxurl,
17			'data'  : { 'action' : 'slzexploore', 'module' : module, 'params' : params },
18			success : function( response ) {
19				if( 'function' == typeof( fun ) ) {
20					fun.call( this, response );
21				}
22			}
23		});
24	};
25
26	$.fn.slzexploore.replace = function( str, data ) {
27		return str.replace( /{([^}]+)}/g, function( match, key, offset, old ) {
28			return $this.find( data, key );
29		});
30	};
31
32	$.fn.slzexploore.find = function( data, key ) {
33		var part = key.split(".");
34		var rev = data;
35		$.each( part, function( index, value ) {
36			if( 'undefined' != typeof( rev ) ) {
37				rev = rev[value];
38			}
39		});
40
41		return rev;
42	};
43	
44	$.fn.slzexploore.merge = function( o, n ) {
45		if( n ) {
46			for( var p in n ) {
47				try {
48					if( n[p].constructor == Object ) {
49						o[p] = $.fn.Chart.merge( o[p], n[p] );
50					} else {
51						o[p] = n[p];
52					}
53				} catch( e ) {
54					o[p] = n[p];
55				}
56			}
57		}
58
59		return o;
60	};
61	
62	$.fn.slzexploore.toHash = function( data ) {
63		var result = {};
64
65		$.each( data, function( index, row ) {
66			result[row['name']] = row['value'];
67		});
68
69		return result;
70	};
71	
72	$.fn.slzexploore.valid = function() {
73		if( $('#post').length > 0 ){
74			var post_type = $("#post [name='post_type']").val();
75			switch( post_type ){
76				case 'design':
77					$.fn.slzexploore.valid_design();
78					break;
79			}
80		}
81	};
82
83	$.fn.slzexploore.ok = false;
84	
85	$.fn.slzexploore.valid_design = function() {
86
87		$('#post').submit( function() {
88			if( ! $.fn.slzexploore.ok ){
89				$.fn.slzexploore.ajax( ['setting.Setting_Controller', 'design_valid'], [$.fn.slzexploore.toHash( $('#post').serializeArray() )], function( response ) {
90					if( response && 1 == response['ok'] ) {
91						$.fn.slzexploore.ok = true;
92						$('#post').submit();
93					} else {
94						console.dir( response['error'] );
95					}
96				});
97
98				return false;
99			}
100		});
101	};
102})(jQuery);
103
104jQuery( document ).ready(function() {
105	jQuery.fn.slzexploore.valid();
106});

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.