2009-10-12 26 views
3

我正在爲網站工作508個可訪問的標準。有一個Firefox插件可以幫助檢查網頁的每個頁面WAVE addons
我有一個履帶遍歷網站的所有頁面。
現在我想結合WAVE插件+我的履帶自動檢查網站508可訪問性符合性。運行firefox addons命令行

我的問題是如何從命令行運行帶有特定URL的Firefox插件?

感謝您的幫助,
胡志明市

+0

可能的GreaseMonkey可以幫助你。 – jantimon 2009-10-12 08:52:07

+0

GreaseMonkey如何提供幫助?你能提供更多的信息嗎? 如果這不是一個好方法。我正在考慮將我的抓取工具遷移到Firefox插件以便使用WAVE源代碼 – Minh 2009-10-13 02:19:16

回答

2

附加組件不能「跑」(什麼意思運行命令行的Adblock,例如?)。

如果您使用的加載項不支持命令行參數。你可以write an extension that checks the command line並調用你想要「運行」的任何其他附加組件的適當函數。

+0

我會試試這種方式。感謝您的回答 – Minh 2009-10-21 02:26:29

7

你可以從你的COMAND行做很多複雜的東西作爲運行內嵌的JavaScript,也許 這可以幫助你:

$ firefox 'data:text/html;charset=ISO-8859-1, 
<html> 
<head> 
<title>TEST Demo</title> 
</head> 
<body> 
<h3 id="title">Test demo</h3> 
<script language="javascript"> 
window.open("http://perso.f-hauri.ch/~felix/svg/dustin_w_Clock_autonom.svg","clock","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=600,top=100,left=120"); 
window.open("http://perso.f-hauri.ch/~felix/svg/fw.svg","netrate","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=420,height=372,top=40,left=620"); 
var s=10; 
function cntdwn() 
{ 
    document.getElementById("title").innerHTML="Test demo: "+s;s=s-1; 
    if (0 > s) 
    { 
    window.location="http://perso.f-hauri.ch/~felix/meteo/picture/meteo.html"; 
    } 
    else window.setTimeout(cntdwn,1000); 
    }; 
    window.onload=cntdwn; 
</script> 
</body>'