自动填充评论表单工具-适用于WordPress、zblog、Typecho和emlog

6.10K 浏览技术资料
0

到博客留言有一个步骤就是填写评论表单,如果留言多的话这个过程就相当消耗时间了,这里有一个适用于WordPress、zblog、Typecho和emlog等博客程序的JS代码,将它们添加为Chrome、Firefox书签,然后到留言页面点击书签就可以自动填写评论表单数据了。

javascript: void
function() {
var lauthor = ["#author","input[name='comname']","#inpName","input[name='author']","#ds-dialog-name","#name"],
lmail =["#mail","#email","input[name='commail']","#inpEmail","input[name='email']","#ds-dialog-email","input[name='mail']"],
lurl =["#url","input[name='comurl']","#inpHomePage","#ds-dialog-url","input[name='url']","#website"];
for (i = 0; i < lauthor.length; i++) {
var author = document.querySelector(lauthor[i]);
if (author != null) {
author.value = '挖站否';
break;
}
}
for (j = 0; j < lmail.length; j++) {
var mail = document.querySelector(lmail[j]);
if (mail != null) {
mail.value = '[email protected]';
break;
}
}
for (k = 0; k < lurl.length; k++) {
var url = document.querySelector(lurl[k]);
if (url != null) {
url.value = 'https://wzfou.com';
break;
}
}
return ! 1;
} ()


分享到:
添加评论
写下您的答案。

Login

Welcome! Login in to your account

Remember me Lost your password?

Don't have account. Register

Lost Password

Register