效果是在淘宝商品页面上,一口价被替换成一个按钮,点击它将每秒刷新一次购买页面,再点击一次停止。
Code: Select all
Name = "taobao buy"
Active = TRUE
URL = "$TYPE(htm)*item.taobao.com/*"
Limit = 256
Match = "一 口 价$URL(http://item.taobao.com/*-([^-]++)\1.(htm|jhtml))"
Replace = "<script type="text/javascript">"
"var woIntervalId = 0;"
"function woClickHandler ( )"
"{"
" if ( document.getElementById("woButton").value == "Click me!" )"
" {"
" document.getElementById("woButton").value = "Enough!";"
" woIntervalId = setInterval ( "wo()", 1000 );"
" }"
" else"
" {"
" document.getElementById("woMessage").innerHTML = "";"
" document.getElementById("woButton").value = "Click me!";"
" clearInterval ( woIntervalId );"
" }"
"}"
""
"function wo ( )"
"{"
" window.open("http://buy.taobao.com/auction/buy_now.jhtml?auction_id=\1","new");"
"}"
"</script>"
""
"<div id="woMessage" ></div>"
"<input type="button" name="clickMe" id="woButton" value="Click me!" onclick="woClickHandler()"/>"