PageSourceSearch

https://benehardware.com/wp-content/plugins/infility-global/js/infility_global.js?ver=7.1.2

js benehardware.com collected 2026-10-04 04:19:11 UTC 2,093 bytes, 60 lines download raw bytes

1(function($) {
2	$('#CFP_plugins_setting').on('change','.plugin_swtich',function(){
3		var _this = $(this),
4			key = _this.attr('key'),
5			isChecked = _this.is(':checked');
6
7		if (_this.hasClass('load')) return false;
8		_this.addClass('load');
9		global_obj.auto_alert('Loading','loading',-1);
10
11		$.post(ajax_object.ajax_url,{action:'infility_global_ajax',do_action:'plugin_swtich',key:key,isChecked:(isChecked?1:0)},function(data){
12			if (data.ret==1) {
13				global_obj.auto_alert(data.msg,'success');
14				
15				// 实时更新UI:根据开关状态更新左边标题的显示
16				var titleCell = _this.closest('tr').find('td:nth-child(2)');
17				var currentTitle = titleCell.text().trim();
18				
19				if (isChecked) {
20					// 开启状态:如果当前是纯文本,转换为链接
21					if (titleCell.find('a').length === 0) {
22						// 构建设置页面链接
23						var currentUrl = window.location.href.split('&set_type')[0];
24						var setType = key + '|' + getPluginHref(key);
25						if (setType.indexOf('|') > 0 && setType.split('|')[1]) {
26							var linkUrl = currentUrl + '&set_type=' + setType;
27							titleCell.html('<a href="' + linkUrl + '">' + currentTitle + '</a>');
28						}
29					}
30				} else {
31					// 关闭状态:如果当前是链接,转换为纯文本
32					if (titleCell.find('a').length > 0) {
33						titleCell.html(currentTitle);
34					}
35				}
36			}else{
37				global_obj.auto_alert(data.msg,'fail');
38			}
39			_this.removeClass('load');			
40		},'json')
41	})
42	
43	// 获取插件的href配置
44	function getPluginHref(key) {
45		var pluginHrefs = {
46			'CFP': 'CFP_setting_page',
47			'301jump': 'redirect_setting_page',
48			'ChatTool': 'chat_tool_setting_page',
49			'ConsentMode': 'consent_mode_setting_page',
50			'InfilityForm': 'setting_page',
51			'TranslateTool': 'translate_tool_setting_page',
52			'PreventCopying': 'prevent_copying_setting_page',
53			'BlockIp': 'block_ip_setting_page',
54			'InfilityImportData': 'import_data_setting_page',
55			'ShowControlData': 'show_control_data_setting_page',
56			'TranslatepressTools': 'setting_page'
57		};
58		return pluginHrefs[key] || '';
59	}
60})( jQuery );

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.