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

📄 applauncher.xml

📁 在流览器上仿CS界面的JAVASCRIPT脚本
💻 XML
字号:
<application>	<window caption="App Launcher"/>	<resources>		<script><![CDATA[/* * This is a sample application for launching test applications. The application * loads an xml file and populates a list from that xml. Each item represents a * test application in the test directory */function AppLauncher() {	var win = application.getWindow();	this.iframe = new BiIframe;	this.appList = new BiList;	this.splitPane = new BiSplitPane("horizontal", this.appList, this.iframe);	this.xmlLoader = new BiXmlLoader;	this.openButton = new BiButton("Open");	this.timer = new BiTimer(100);	// the default border in Mozilla is just plain ugly	if ( BiBrowserCheck.moz )		this.iframe.setBorder( new BiBorder(2, "inset") );	this.splitPane.setDividerLocation( 200 );	this.appList.setMultipleSelection(false);	this.openButton.setEnabled(false);	win.setAcceptButton(this.openButton);	win.add(this.splitPane);	win.add(this.openButton);	this.openButton.setWidth(75);	this.openButton.setRight(7);	this.openButton.setBottom(7);	this.splitPane.setLocation(7, 7);	this.splitPane.setRight(7);	this.splitPane.setBottom(this.openButton.getBottom() +		this.openButton.getHeight() + 7);	this.xmlLoader.setAsync(true);	this.xmlLoader.addEventListener("load", this.onAppListXmlLoaded, this);	this.xmlLoader.load( AppLauncher.APP_LIST_PATH );	this.openButton.addEventListener("action", this.onOpenButtonAction, this);	this.appList.addEventListener("change", this.onAppListChange, this);	this.timer.addEventListener("tick", this.onTick, this);}AppLauncher.APP_LIST_PATH = "applist.xml";AppLauncher.APP_BASE = "../../test/";AppLauncher.prototype.onAppListXmlLoaded = function (e) {	var doc = this.xmlLoader.getDocument();	var listItems = doc.getElementsByTagName("Application");	var l = listItems.length;	var listItem;	var image = new BiImage( "file.png", 16, 16 );	for (var i = 0; i < l; i++) {		listItem = new BiListItem( listItems[i].getAttribute("src") );		listItem.setIcon( image );		this.appList.add(listItem);		listItem.addEventListener("action", this.onItemAction, this);	}};AppLauncher.prototype.onItemAction = function (e) {	this.runItem(e.getTarget());};AppLauncher.prototype.onOpenButtonAction = function (e) {	var item = this.appList.getSelectedItems();	if (item.length == 1)		this.runItem(item[0]);};AppLauncher.prototype.onAppListChange = function (e) {	var oItem = this.appList.getSelectedItem();	this.openButton.setEnabled( oItem != null );	this.timer.start();};AppLauncher.prototype.onTick = function (e) {	this.timer.stop();	var oItem = this.appList.getSelectedItem();	this.iframe.getContentDocument().location.replace( AppLauncher.APP_BASE + oItem.getText() );};AppLauncher.prototype.runItem = function (oItem) {	biExec( application.getPath(), AppLauncher.APP_BASE + oItem.getText() );};AppLauncher.main = function () { new AppLauncher; };		]]></script>	</resources></application>

⌨️ 快捷键说明

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