通用一键评论Javascript书签

WordPress专用:

javascript:document.getElementById('author').value='Xiaokyun';document.getElementById('mail').value='comment@xiaokyun.com';document.getElementById('url').value='http://www.xiaokyun.com/';void(0)

全平台通用版:

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 = 'Xiaokyun';
            break;
        }
    }
    for (j = 0; j < lmail.length; j++) {
        var mail = document.querySelector(lmail[j]);
        if (mail != null) {
            mail.value = 'comment@xiaokyun.com';
            break;
        }
    }
    for (k = 0; k < lurl.length; k++) {
        var url = document.querySelector(lurl[k]);
        if (url != null) {
            url.value = 'http://www.xiaokyun.com';
            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']","#website"];for(i=0;i<lauthor.length;i++){var author=document.querySelector(lauthor[i]);if(author!=null){author.value='Xiaokyun';break}}for(j=0;j<lmail.length;j++){var mail=document.querySelector(lmail[j]);if(mail!=null){mail.value='comment@xiaokyun.com';break}}for(k=0;k<lurl.length;k++){var url=document.querySelector(lurl[k]);if(url!=null){url.value='http://www.xiaokyun.com';break}}return!1}()

原文:http://www.ilxtx.com/automatically-fill-in-personal-information.html