slug: 120
title: One-click Fill-in of Blog Comment Information in Browser Favorites
date: 2022-04-26 14:08:00
updated: 2022-05-09 14:47:46
categories:
- Technology
tags: - Blog
- JavaScript
First, bookmark a page, then right-click on it and select "Modify". Copy the following JavaScript code into the URL input box, and you can fill in the information with one click.
Modify the nickname, email, and website in the code to your own information.
Currently, it supports most mainstream blog platforms and systems. If it doesn't work, you can modify and add the attributes of the input in the code below.
If you don't know how to modify it, you can leave a comment in the comment section with the website that doesn't work, and I can update the code.
javascript:void function(){var lauthor=["#author","input[name='comname']","#inpName","input[name='author']","#ds-dialog-name","input[name='wc_name']", "input[name='nick']",],lmail=["#mail","#email","input[name='commail']","#inpEmail","input[name='email']","#ds-dialog-email","input[name='wc_email']","input[name='mail']",],lurl=["#url","input[name='comurl']","#inpHomePage","#ds-dialog-url","input[name='url']","input[name='wc_website']","input[name='link']",];for(i=0;i<lauthor.length;i++){var author=document.querySelector(lauthor[i]);if(author!=null){author.value='Your Name';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://your-website.com';break}}return!1}()