博客评论信息自动填写,这个通用方法网上很久之前就有了,并且已经适用于wordpress、Typecho、zblog和emlog等平台,加入Bitcron之后发现其无法填充默认网站地址,于是小小的修改了一下。把Bitcron默认评论框的input[name='site']
添加了进去,这样就可以方便支持Bitcron平台的博客了。
使用方法你们都懂得(保存为书签),代码如下:
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']", "input[name='site']", "#website"];
for (i = 0; i < lauthor.length; i++) {
var author = document.querySelector(lauthor[i]);
if (author != null) {
author.value = 'Ton';//修改为自己的昵称
break;
}
}
for (j = 0; j < lmail.length; j++) {
var mail = document.querySelector(lmail[j]);
if (mail != null) {
mail.value = 'i@ton.tn';//修改为自己的邮箱
break;
}
}
for (k = 0; k < lurl.length; k++) {
var url = document.querySelector(lurl[k]);
if (url != null) {
url.value = 'https://ton.tn';//修改为自己的网址
break;
}
}
return ! 1;
} ()
//压缩版
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']", "input[name='site']", "#website"]; for (i = 0; i < lauthor.length; i++) { var author = document.querySelector(lauthor[i]); if (author != null) { author.value = 'Ton'; break; } } for (j = 0; j < lmail.length; j++) { var mail = document.querySelector(lmail[j]); if (mail != null) { mail.value = 'i@ton.tn'; break; } } for (k = 0; k < lurl.length; k++) { var url = document.querySelector(lurl[k]); if (url != null) { url.value = 'https://ton.tn'; break; } } return !1; }()
[url=https://www.wikipedia.org/]https://www.wikipedia.org/[/url]