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

📄 swfupload.graceful_degradation.js

📁 WordPress是一个Blog程序,用它你可以架设完全属于你自己的Blog. 而WordPress现在的应用又不仅仅只是在Blog方面,因为其强大的扩展性,部分网站甚至已经开始使用WordPress
💻 JS
字号:
/* 	SWFUpload Graceful Degradation Plug-in	This plugin allows SWFUpload to display only if it is loaded successfully.  Otherwise a default form is left displayed.		Usage:		To use this plugin create two HTML containers. Each should have an ID defined.  One container should hold the SWFUpload UI.  The other should hold the degraded UI.		The SWFUpload container should have its CSS "display" property set to "none".		If SWFUpload loads successfully the SWFUpload container will be displayed ("display" set to "block") and the	degraded container will be hidden ("display" set to "none").		Use the settings "swfupload_element_id" and "degraded_element_id" to indicate your container IDs.  The default values are "swfupload_container" and "degraded_container".	*/var SWFUpload;if (typeof(SWFUpload) === "function") {	SWFUpload.gracefulDegradation = {};	SWFUpload.prototype.initSettings = function (old_initSettings) {		return function (init_settings) {			if (typeof(old_initSettings) === "function") {				old_initSettings.call(this, init_settings);			}						this.addSetting("swfupload_element_id",		  		init_settings.swfupload_element_id,				"swfupload_container");			this.addSetting("degraded_element_id",		  		init_settings.degraded_element_id,				"degraded_container");			this.addSetting("user_swfUploadLoaded_handler",		init_settings.swfupload_loaded_handler,			SWFUpload.swfUploadLoaded);			this.swfUploadLoaded_handler = SWFUpload.gracefulDegradation.swfUploadLoaded;		};	}(SWFUpload.prototype.initSettings);	SWFUpload.gracefulDegradation.swfUploadLoaded = function () {		var swfupload_container_id, swfupload_container, degraded_container_id, degraded_container, user_swfUploadLoaded_handler;		try {			if (uploadDegradeOptions.is_lighttpd_before_150) throw "Lighttpd versions earlier than 1.5.0 aren't supported!";			swfupload_element_id = this.getSetting("swfupload_element_id");			degraded_element_id = this.getSetting("degraded_element_id");						// Show the UI container			swfupload_container = document.getElementById(swfupload_element_id);			if (swfupload_container !== null) {				swfupload_container.style.display = "block";				// Now take care of hiding the degraded UI				degraded_container = document.getElementById(degraded_element_id);				if (degraded_container !== null) {					degraded_container.style.display = "none";				}			}		} catch (ex) {			this.debug(ex);		}				user_swfUploadLoaded_handler = this.getSetting("user_swfUploadLoaded_handler");		if (typeof(user_swfUploadLoaded_handler) === "function") {			user_swfUploadLoaded_handler.apply(this);		}	};}

⌨️ 快捷键说明

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