PageSourceSearch

https://www.rpccn.com/template/subsite/asset/js/hlexpand.js?v=2026.9.15.1

js rpccn.com collected 2026-10-03 02:39:02 UTC 8,241 bytes, 228 lines download raw bytes

1var TplConfigEx = {
2	'Browser': {
3		url: document.URL,
4		domain: document.domain,
5		title: document.title,
6		urlpath: document.location.pathname,
7		language: (navigator.browserLanguage || navigator.language).toLowerCase(),
8		canvas: function() {
9			return !!document.createElement("canvas").getContext
10		}(),
11		useragent: function() {
12			var a = navigator.userAgent;
13			return {
14				mobile: !! a.match(/AppleWebKit.*Mobile.*/),
15				ios: !! a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
16				android: -1 < a.indexOf("Android") || -1 < a.indexOf("Linux"),
17				iPhone: -1 < a.indexOf("iPhone") || -1 < a.indexOf("Mac"),
18				iPad: -1 < a.indexOf("iPad"),
19				trident: -1 < a.indexOf("Trident"),
20				presto: -1 < a.indexOf("Presto"),
21				webKit: -1 < a.indexOf("AppleWebKit"),
22				gecko: -1 < a.indexOf("Gecko") && -1 === a.indexOf("KHTML"),
23				weixin: -1 < a.indexOf("MicroMessenger")
24			}
25		}()
26	},
27	'Cookie': {
28		'Set':function(name,value,days){
29	        var expires;
30	        if (days) {
31	            expires = days;
32	        } else{
33	            expires = "";
34	        }
35	        $.cookie(name,value,{expires:expires,path:'/'});
36		},
37		'Get':function(name){
38			var styles = $.cookie(name);
39		    return styles;
40		},
41		'Del':function(name){
42	        $.cookie(name,null,{expires:-1,path: '/'});
43		}
44	},
45	'History': {
46		'Limit':12,
47        'Days':7,
48		'Json':'',
49		'Init':function(){
50			var get_history = TplConfigEx.Cookie.Get("history");
51			if(get_history){
52				var json=eval("("+get_history+")");
53				var list="";
54				for(i=0;i<json.length;i++){
55					list = list + '<li class="vodlist_item"><a href="'+json[i].link+'" title="'+json[i].name+'"><div class="vodlist_thumb" style="background-image:url('+json[i].pic+')"><span class="pic_text text_right">观看至'+json[i].part+'</span></div><div class="vodlist_titbox"><p class="vodlist_title">'+json[i].name+'</p></div></a></li>';
56				}
57				$("#tplconfig_history").append(list);
58				$(".tplconfig_history_title").prepend('<a class="clean_history" target="_self" href="javascript:void(0)" onclick="TplConfigEx.History.Clear();">清空</a>');
59			}else{
60				$("#tplconfig_history").append('<li class="tplconfig_history_no"> <div class="nodata-img"></div> <i class="iconfont"></i>暂无观看记录<p class="user_log_tips"> <a class="mac_user" href="javascript:void(0)">登录查看更多</a></p></li>');
61				// <a class="mac_user" href="javascript:void(0)">登录查看更多</a></p></li>
62			}
63			if($.cookie('user_id')){
64				$('.user_log_tips').hide()
65			}else{
66				$('.user_log_tips').show()
67			}
68			$('.history').click(function(){
69				$('html,body').addClass("overhidden");
70				$('.tplconfig_history_bg').addClass("hfixed");
71				$("body").append('<div class="mac_pop_bg"></div>');
72				$("#close_history").click(function(){
73					$(".tplconfig_history_bg").removeClass("hfixed");
74					$('html,body').removeClass("overhidden");
75					$('.mac_pop_bg').remove();
76				});
77				$('.mac_user').click(function(){
78					location.href='/user/login.html'
79					console.log(location)
80				});
81			});
82			if($(".hl_history").length){
83	            var $that = $(".hl_history");
84	            TplConfigEx.History.Set($that.attr('data-name'),$that.attr('data-link'),$that.attr('data-pic'),$that.attr('data-part'));
85	        }
86		},
87		'Set':function(name,link,pic,part){
88			if(!link){ link = document.URL;}
89			var history = TplConfigEx.Cookie.Get("history");
90			var len=0;
91			var canadd=true;
92			if(history){
93			   history = eval("("+history+")"); 
94			   len=history.length;
95			   $(history).each(function(){
96			      if(name===this.name){
97			         canadd=false;
98			         var json="[";
99			         $(history).each(function(i){
100			            var temp_name,temp_pic,temp_url,temp_part;
101			            if(this.name===name){
102			                 temp_name=name;temp_pic=pic;temp_url=link;temp_part=part;
103			            }else{
104			                 temp_name=this.name;temp_pic=this.pic;temp_url=this.link;temp_part=this.part;
105			            }
106			            json+="{\"name\":\""+temp_name+"\",\"pic\":\""+temp_pic+"\",\"link\":\""+temp_url+"\",\"part\":\""+temp_part+"\"}";
107			            if(i!==len-1){
108							json+=",";
109						} 
110			          });
111			          json+="]";
112			          TplConfigEx.Cookie.Set('history',json,this.Days);
113			          return false;
114			        }
115			    });
116			}
117			if(canadd){
118			    var json="[";
119			    var isfirst="]";
120			    isfirst=!len?"]":",";
121			    json+="{\"name\":\""+name+"\",\"pic\":\""+pic+"\",\"link\":\""+link+"\",\"part\":\""+part+"\"}"+isfirst;
122			     if(len>this.Limit-1){
123					len-=1;
124				 }   	
125		        for(i=0;i<len-1;i++){
126		            json+="{\"name\":\""+history[i].name+"\",\"pic\":\""+history[i].pic+"\",\"link\":\""+history[i].link+"\",\"part\":\""+history[i].part+"\"},";
127		       	}
128		        if(len>0){
129		            json+="{\"name\":\""+history[len-1].name+"\",\"pic\":\""+history[len-1].pic+"\",\"link\":\""+history[len-1].link+"\",\"part\":\""+history[len-1].part+"\"}]";
130		        }
131			    TplConfigEx.Cookie.Set('history',json,this.Days);
132			}  
133		},
134		'Clear': function(){
135            TplConfigEx.Cookie.Del('history');
136            $("#tplconfig_history").empty();
137			$(".tplconfig_history_box").html('<div class="tplconfig_history_clear">已清空观看记录</div>');
138        },
139	},
140	'Shows':{
141		'Text': function() {
142			showdiv = function(obj) {
143				var x = obj.parentNode;
144				var y = x.nextSibling;
145				if (y.nodeType !== 1) {
146					y = y.nextSibling;
147				}
148				y.style.display = "block";
149				x.style.display = "none";
150			}
151
152			hidediv = function(obj) {
153				var y = obj.parentNode;
154				var x = y.previousSibling;
155				if (x.nodeType !== 1) {
156					x = x.previousSibling;
157				}
158				y.style.display = "none";
159				x.style.display = "block";
160			}
161			var $contextContents = $(".context .js-desc-content");
162			if ($contextContents.length === 0) {
163				$contextContents = $(".context span");
164			}
165			$.each($contextContents, function (i) {
166				var $current = $contextContents.eq(i);
167				var $showBtn = $current.siblings('.show_btn').first();
168				if ($showBtn.length === 0) {
169					$showBtn = $current.next('.show_btn');
170				}
171				if ($current.height() > 50) {
172					$showBtn.css('display', 'block');
173				} else {
174					$showBtn.css('display', 'none');
175				}
176			});
177		},
178		'List': function() {
179			showlist = function() {
180				$('.playlist_notfull,.listshow').css('display', 'none');
181				$('.playlist_full').css('display', 'block');
182			};
183			hidelist = function() {
184				$('.playlist_notfull').css('display', 'block');
185				$('.playlist_full').css('display', 'none');
186			};
187			$.each($("#playlistbox li"), function () {
188				var Lnum = document.getElementById('playlistbox').getElementsByTagName("li").length;
189				var W = $(window).width();
190				if (W > 820) {
191					if (Lnum > 24) {
192						$('.playlist_full').css('display', 'none');
193					}else{
194						$('.playlist_notfull,.listshow').css('display', 'none');
195						$('.playlist_full').css('display', 'block');
196					}
197				}else{
198                    $('.playlist_notfull,.listshow').css('display', 'none');
199                    $('.playlist_full').css('display', 'block');
200                }
201			});
202
203		}
204
205	 },
206	'Notice':function(){
207		var tips_title = $("#tips_title").val();
208		var tips_text = $("#tips_text").val();
209		let lang=localStorage.getItem('lang')
210		if(TplConfigEx.Cookie.Get('hl_notice')===null && tips_text ){
211			$("body").append('<div class="hl_wrap"><div class="hl_content gonggao hl_notice"><div class="hl_content_hd "><h4 class="hl_content_title">' + tips_title + '</h4></div><div class="hl_content_bd">' + tips_text + '</div><div class="hl_content_ft"><a class="hl_btn_no" href="javascript:;">'+(lang==1?'I got it':'我知道了')+'</a><a class="close_box" href="javascript:;">取消</a></div></div></div>');setTimeout(function(){$(".hl_notice").addClass("hl_show");$(".hl_wrap").prepend('<div class="mac_pop_bg"></div>');$(".mac_pop_bg").click(function() {$(".hl_wrap").remove();});}, 100);
212			$(".hl_btn_no").click(function() {
213				TplConfigEx.Cookie.Set('hl_notice','ok',1);
214				$(".hl_wrap").remove();
215			});
216			$(".close_box,.hl_btn_no").click(function() {
217				$(".hl_wrap").remove();
218			});
219		}
220	}
221};
222
223$(function(){
224	TplConfigEx.History.Init();
225	TplConfigEx.Shows.Text();
226	TplConfigEx.Shows.List();
227});
228

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.