PageSourceSearch

https://moviedle.io/themes/moviedle.io/rs/js/script.js

js moviedle.io collected 2026-10-04 10:05:34 UTC 8,432 bytes, 283 lines download raw bytes

1//===================================== ~fullscreen.php <script> ===========================================
2$("#expand").on('click', function () {
3	$("#iframehtml5").addClass("force_full_screen");
4	$("#_exit_full_screen").removeClass('hidden');
5	requestFullScreen(document.body);
6});
7
8$("#_exit_full_screen").on('click', cancelFullScreen);
9
10
11function requestFullScreen(element) {
12	//theater mode
13	$(".header-game").removeClass("header_game_enable_half_full_screen");
14	$("#iframehtml5").removeClass("force_half_full_screen");
15
16	// Supports most browsers and their versions.
17	var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
18	if (requestMethod) { // Native full screen. 
19		requestMethod.call(element);
20	} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
21		var wscript = new ActiveXObject("WScript.Shell");
22		if (wscript !== null) {
23			wscript.SendKeys("{F11}");
24		}
25	}
26}
27
28function cancelFullScreen() {
29	// $(".header").addClass('fixed');
30
31	$("#_exit_full_screen").addClass('hidden');
32	$("#iframehtml5").removeClass("force_full_screen");
33
34	//theater mode
35	$(".header-game").removeClass("force_full_screen header_game_enable_half_full_screen");
36	$("#iframehtml5").removeClass("force_half_full_screen");
37
38	var requestMethod = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.exitFullScreenBtn;
39	if (requestMethod) { // cancel full screen.
40		requestMethod.call(document);
41	} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
42		var wscript = new ActiveXObject("WScript.Shell");
43		if (wscript !== null) {
44			wscript.SendKeys("{F11}");
45		}
46	}
47}
48
49if (document.addEventListener) {
50	document.addEventListener('webkitfullscreenchange', exitHandler, false);
51	document.addEventListener('mozfullscreenchange', exitHandler, false);
52	document.addEventListener('fullscreenchange', exitHandler, false);
53	document.addEventListener('MSFullscreenChange', exitHandler, false);
54}
55
56// check exit all
57function exitHandler() {
58	if (document.webkitIsFullScreen === false ||
59		document.mozFullScreen === false ||
60		document.msFullscreenElement === false) {
61		cancelFullScreen();
62	}
63}
64
65//============================== theater Mode  =========================================
66function theaterMode() {
67	//clear postion fixed header => function: requestFullScreen(document.body);
68	// if($(".header").hasClass("fixed")) {
69	//     $(".header").removeClass("fixed");
70	// } else {
71	//     $(".header").addClass("fixed");
72	// }
73
74	// off scroll: CSS: body::-webkit-scrollbar {display: none;} => class 'scroll'
75	// if($("body").hasClass("scroll")) {
76	//     $("body").removeClass("scroll");
77	// } else {
78	//     $("body").addClass("scroll");
79	// }
80
81	// if($("#back-to-top").hasClass("hidden-scroll")) {
82	//     $("#back-to-top").removeClass("hidden-scroll");
83	// } 
84	// else {
85	//     $("#back-to-top").addClass("hidden-scroll");
86	// }
87
88	let iframe = document.querySelector("#iframehtml5");
89	if (iframe.classList.contains("force_half_full_screen")) {
90
91		iframe.classList.remove("force_half_full_screen")
92		document.querySelector(".header-game").classList.remove("header_game_enable_half_full_screen")
93		return;
94	}
95	let above = 0;
96	let left = 0;
97	let below = $(".header-game").outerHeight();
98	let right = 0;
99	// let width = window.innerWidth;
100	// let height = window.innerHeight;
101	if (!document.querySelector("#style-append")) {
102		let styleElement = document.createElement("style");
103		styleElement.type = "text/css";
104		styleElement.setAttribute('id', "style-append");
105		let cssCode = `
106    .force_half_full_screen{
107    position: fixed!important;
108    top: 0!important;
109    left: 0!important;
110    z-index: 887!important;
111    top:${above}px!important;
112    left:${left}px!important;
113    width:calc(100% - ${left}px)!important;
114    height:calc(100% - ${above + below}px)!important;
115    background-color:#000;
116    }
117    .header_game_enable_half_full_screen{
118        position:fixed;
119        left:${left}px!important;
120        bottom:0!important;
121        right:0!important;
122        z-index:887!important;
123        width:calc(100% - ${left}px)!important;
124        padding-left:10px;
125        padding-right:10px;
126        border-radius:0!important;
127    }
128    @media (max-width: 1364px){
129        .force_half_full_screen{
130            left:0!important;
131            width:100%!important;
132        }
133        .header_game_enable_half_full_screen{
134            width:100%!important;
135            left:0!important;
136        }
137    }`
138		styleElement.innerHTML = cssCode;
139		document.querySelector('head').appendChild(styleElement);
140	}
141	iframe.classList.add("force_half_full_screen")
142	document.querySelector(".header-game").classList.add("header_game_enable_half_full_screen")
143}
144
145// ============================ search ================================= 
146$('.btn_search').on('click', function () {
147	gameSearch()
148})
149
150$('.input_search').on('keyup', function (e) {
151	if (e.key === 'Enter' || e.keyCode === 13) {
152		gameSearch()
153	}
154})
155function gameSearch() {
156	let keywords = $(".input_search").val();
157	var rex_rule = /[ \-\.?:\\\/\_\'\*]+/g;
158	var value1 = keywords.replace(rex_rule, " ").trim().toLowerCase();
159	value1 = value1.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
160	var url = '/search/' + value1;
161	if (value1 && oldValue != value1) {
162		oldValue = value1;
163		window.location.href = url;
164	}
165}
166
167// ============================ paging vs click pagination.php + show gif loading ================================= 
168function paging(p) {
169	$(".loading_mask").removeClass("hidden-load");
170	if (!p) {
171		p = 1;
172	}
173	let url = "/paging.ajax";
174	$.ajax({
175		url: url,
176		type: "POST",
177		data: {
178			p: p,
179			keywords: keywords,
180			field_order: field_order,
181			order_type: order_type,
182			category_id: category_id,
183			// is_hot: is_hot,
184			// is_new: is_new,
185			tags_id: tags_id,
186			limit: limit,
187		},
188		success: function (response) {
189			$(".loading_mask").addClass("hidden-load");
190			$('html, body').animate({
191				scrollTop: $(".main-title").offset().top
192			}, 1000);
193			if (response) {
194				$("#ajax-append").html(response);
195			}
196		}
197	})
198}
199
200$(document).ready(function () {
201	if (id_game) {
202		addPlugin(); // ajax full_rate + comment
203	}
204
205
206	// share game play
207	$(".shares-btn").click(function (e) {
208		$(".share_lists").toggleClass("hidden-imp");
209		// e.stopPropagation();
210	})
211
212	// // click outside
213	$(document).click(function (e) {
214		// 	// hidden share game play
215		// 	if (!e.target.closest('.shares-btn')) {
216		// 		if (!$(".share_lists").hasClass("hidden-imp")) {
217		// 			$(".share_lists").addClass("hidden-imp");
218		// 		}
219		// 	}
220		// hidden search
221		if (!e.target.closest('.btn_search') && !e.target.closest('.input-box')) {
222			if ($(".navbar1").hasClass("showInput")) {
223				$(".navbar1").removeClass("showInput");
224			}
225		}
226
227		// Collapse the navbar if the click was outside of it
228		if (!e.target.closest('.nav-links')) {
229			if ($(".nav-links").hasClass("show_mobile")) {
230				$(".nav-links").removeClass("show_mobile");
231			}
232		}
233	});
234
235	// search-box open close js code
236	$(".search-box .bx-search").click(function (e) {
237		$(".navbar1").toggleClass("showInput");
238		// e.stopPropagation();
239	})
240
241	// btn menu mobile
242	$(".navbar1 .bx-menu").click(function (e) {
243		$(".nav-links").toggleClass("show_mobile");
244		e.stopPropagation();
245	})
246
247	// sidebar submenu open close js code
248	$(".menu_more").click(function (e) {
249		$(".nav-links").toggleClass("show1");
250		// e.stopPropagation();
251	})
252
253
254	// //embed file ads.css 
255	// if (enable_ads) {
256	// 	let head_tag = document.querySelector('head');
257	// 	let css_ads = '<link rel="stylesheet" href="' + theme_url + 'rs/css/ads.css"></link>'
258	// 	head_tag.insertAdjacentHTML("beforeend", css_ads);
259	// }
260})
261
262// ajax full_rate + comment
263function addPlugin() {
264	if (!id_game && !url_game) {
265		return
266	}
267	let url = "/add-plugin.ajax";
268	$.ajax({
269		url: url,
270		type: "POST",
271		data: {
272			id_game: id_game,
273			url_game: url_game,
274		},
275		success: function (response) {
276			if (response) {
277				let data = JSON.parse(response);
278				$("#append-rate").html(data.rate);
279				$("#append-comment").html(data.comment);
280			}
281		}
282	})
283}

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.