我希望制作Chrome扩展程序..我想要一个您提交关键字的选项页面:
<html> <head> <title>Options</title> </head> <body> Keyword:<input id="keyText" name="Keyword" type="text"> <input name="Submit" type="submit" value="Submit"> </body> </html>这个javascript应该刷新twitter,直到它找到一个关键字然后点击推文中的链接。 我希望将提交的关键字放入第一个var的java脚本中:
var shoeName = ""; var nikestore = "nikestore"; var closeFlag = "no"; var tFunction = "twitterScan()"; var tweet = new Array(); var tweetName = new Array(); function twitterScan() { for (var i = 0; i < 4; i++) { tweetName[i] = document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; tweet[i] = document.getElementsByClassName("js-tweet-text")[i].innerHTML; } //if (document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; if (tweet[0].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[0].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[1].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[1].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[2].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[2].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[3].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[3].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else { location.reload(true); } setTimeout(tFunction, 700); } setTimeout(tFunction, 700); //setInterval("refreshPage()", 3000); //setTimeout("twitterScan()", 100); //setInterval(tFunction, 700);I am looking to make a Chrome extension.. I want an Options Page where you submit a keyword:
<html> <head> <title>Options</title> </head> <body> Keyword:<input id="keyText" name="Keyword" type="text"> <input name="Submit" type="submit" value="Submit"> </body> </html>This javascript is supposed to refresh twitter until it find a keyword then clicks on the link in the tweet. I want this submitted keyword to be put in to a java script into the first var:
var shoeName = ""; var nikestore = "nikestore"; var closeFlag = "no"; var tFunction = "twitterScan()"; var tweet = new Array(); var tweetName = new Array(); function twitterScan() { for (var i = 0; i < 4; i++) { tweetName[i] = document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; tweet[i] = document.getElementsByClassName("js-tweet-text")[i].innerHTML; } //if (document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; if (tweet[0].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[0].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[1].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[1].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[2].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[2].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[3].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[3].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else { location.reload(true); } setTimeout(tFunction, 700); } setTimeout(tFunction, 700); //setInterval("refreshPage()", 3000); //setTimeout("twitterScan()", 100); //setInterval(tFunction, 700);最满意答案
HTML
Keyword:<input id="keyText" name="Keyword" type="text"> <input id="submit_button" name="Submit" type="Submit" value="Submit" onClick="javascript: twitterScan();">JS
<script> var shoeName = ''; function twitterScan() { shoeName = document.getElementById('keyText').value; console.log("Iam called " + shoeName); } </script>查看http://jsfiddle.net/raunakkathuria/5FDT3/
如果这是你需要的,请告诉我
HTML
Keyword:<input id="keyText" name="Keyword" type="text"> <input id="submit_button" name="Submit" type="Submit" value="Submit" onClick="javascript: twitterScan();">JS
<script> var shoeName = ''; function twitterScan() { shoeName = document.getElementById('keyText').value; console.log("Iam called " + shoeName); } </script>Check http://jsfiddle.net/raunakkathuria/5FDT3/
Let me know if this is what you need
提交进入Javascript的HTML关键字(Submitting a Keyword in HTML that goes into Javascript)我希望制作Chrome扩展程序..我想要一个您提交关键字的选项页面:
<html> <head> <title>Options</title> </head> <body> Keyword:<input id="keyText" name="Keyword" type="text"> <input name="Submit" type="submit" value="Submit"> </body> </html>这个javascript应该刷新twitter,直到它找到一个关键字然后点击推文中的链接。 我希望将提交的关键字放入第一个var的java脚本中:
var shoeName = ""; var nikestore = "nikestore"; var closeFlag = "no"; var tFunction = "twitterScan()"; var tweet = new Array(); var tweetName = new Array(); function twitterScan() { for (var i = 0; i < 4; i++) { tweetName[i] = document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; tweet[i] = document.getElementsByClassName("js-tweet-text")[i].innerHTML; } //if (document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; if (tweet[0].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[0].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[1].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[1].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[2].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[2].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[3].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[3].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else { location.reload(true); } setTimeout(tFunction, 700); } setTimeout(tFunction, 700); //setInterval("refreshPage()", 3000); //setTimeout("twitterScan()", 100); //setInterval(tFunction, 700);I am looking to make a Chrome extension.. I want an Options Page where you submit a keyword:
<html> <head> <title>Options</title> </head> <body> Keyword:<input id="keyText" name="Keyword" type="text"> <input name="Submit" type="submit" value="Submit"> </body> </html>This javascript is supposed to refresh twitter until it find a keyword then clicks on the link in the tweet. I want this submitted keyword to be put in to a java script into the first var:
var shoeName = ""; var nikestore = "nikestore"; var closeFlag = "no"; var tFunction = "twitterScan()"; var tweet = new Array(); var tweetName = new Array(); function twitterScan() { for (var i = 0; i < 4; i++) { tweetName[i] = document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; tweet[i] = document.getElementsByClassName("js-tweet-text")[i].innerHTML; } //if (document.getElementsByClassName("fullname js-action-profile-name show-popup-with-id")[0].innerHTML; if (tweet[0].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[0].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[1].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[1].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[2].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[2].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else if (tweet[3].match(shoeName) == shoeName) { document.getElementsByClassName("twitter-timeline-link")[3].click(); tFunction = "get outa here"; shoeName = " 4444 4 456 7 8 456 7 345 7 345 345 3 1 1 133s "; //buffer to jump out of interval loop } else { location.reload(true); } setTimeout(tFunction, 700); } setTimeout(tFunction, 700); //setInterval("refreshPage()", 3000); //setTimeout("twitterScan()", 100); //setInterval(tFunction, 700);最满意答案
HTML
Keyword:<input id="keyText" name="Keyword" type="text"> <input id="submit_button" name="Submit" type="Submit" value="Submit" onClick="javascript: twitterScan();">JS
<script> var shoeName = ''; function twitterScan() { shoeName = document.getElementById('keyText').value; console.log("Iam called " + shoeName); } </script>查看http://jsfiddle.net/raunakkathuria/5FDT3/
如果这是你需要的,请告诉我
HTML
Keyword:<input id="keyText" name="Keyword" type="text"> <input id="submit_button" name="Submit" type="Submit" value="Submit" onClick="javascript: twitterScan();">JS
<script> var shoeName = ''; function twitterScan() { shoeName = document.getElementById('keyText').value; console.log("Iam called " + shoeName); } </script>Check http://jsfiddle.net/raunakkathuria/5FDT3/
Let me know if this is what you need
发布评论