⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogshared.js

📁 类似youtube的视频分享网站源码。有后台管理系统及模板
💻 JS
字号:
// Purpose: functions shared between all dialog windows
var wp_current_obj = null
if (window.dialogArguments) {
	obj = dialogArguments.wp_current_obj
	wp_current_obj = obj
	parentWindow = dialogArguments
} else if (parent.window.dialogArguments) {
	obj = parent.window.obj
	wp_current_obj = obj
	parentWindow = parent.window.parentWindow
} else if (window.opener) {
	obj = window.opener.wp_current_obj
	wp_current_obj = obj
	parentWindow = window.opener
} else if (parent.window.opener) {
	obj = parent.window.obj
	wp_current_obj = obj
	parentWindow = parent.window.parentWindow
} else {
	obj = null
	wp_current_obj = null
	parentWindow = null
}
function colordialog(Action) {
	colorwin = wp_openDialog(parentWindow.wp_directory+"selcolor.php?action="+Action+"&lang=" + obj.instance_lang ,'modal' , 296, 352)
}
function onClose() {
	if (parentWindow.wp_directory) {
		obj.edit_object.focus()
	}
}
function hideLoadMessage() {
	document.getElementById('dialogLoadMessage').style.display = 'none'
}
function showLoadMessage() {
	document.getElementById('dialogLoadMessage').style.display = 'block'
}
function formStop() {
	return false
}
//window.onerror = hide_error;
function hide_error() {
	if (!parentWindow.wp_debug_mode) {
		return true;
	}
}
function make_url_with_base (url) {
	if (obj) {
		if (obj.baseURLurl) {
			if (obj.baseURLurl != '') {
				var str = url.toLowerCase()
				var base = obj.baseURLurl;
				if ( str.substr(0,7) != 'http://' && str.substr(0,8) != 'https://' ) {
					if (str.substr(0,1) == '/') {
						if (base.substr(0,1) != '/') {
							if (base.substr(base.length-1,1) != '/') {
								var check1 = base + '/';
								var check = check1.replace(/((http|https):\/\/[^\/]+)\//gi, '/');
								if (check == '/') {
									base = base + '/';
								} else {
									base = base+'/../';
								}
							}							
							var domain2 = base.replace(/((http|https):\/\/[^\/]+)\//gi, '/');						
							domain = base.substr(0, base.length-domain2.length)
							url = domain + url;
						}
					} else {
						if (base.substr(base.length-1,1) != '/') {
							var check1 = base + '/';
							var check = check1.replace(/((http|https):\/\/[^\/]+)\//gi, '/');
							if (check == '/') {
								base = base + '/';
							} else {
								base = base+'/../';
							}
						}
						url = base + url;
					}
				}
			}
		}
	}
	return url;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -