我正在寫一個Ubiquity命令,但我在JS上有0個表示。如何使用JS打開一個url(例如http://www.stackoverflow.com)?使用Java腳本爲Ubiquity命令打開一個url
編輯:
感謝你的一切,我相信你是正確的,但下面的代碼,我不能夠跳到左右。這可能與Ubiquity有關,但它被聲明爲JS。
CmdUtils.CreateCommand({
names: ["so"],
preview: "go to stackoverflow",
execute: function so_execute() {
displayMessage("Hello, World!");
window.open('http://www.stackoverflow.com', 'dialog');
//neither other two method will work
}
});