Skip to content

Instantly share code, notes, and snippets.

@maicong
Created April 10, 2018 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maicong/cd221443d83c82ace23ca7222a648baa to your computer and use it in GitHub Desktop.
Save maicong/cd221443d83c82ace23ca7222a648baa to your computer and use it in GitHub Desktop.
javascript:(() => {
const $ = ele => document.querySelector(ele) || null;
const $author = $('input[name="author"]');
const $mail = $('input[name="mail"]') || $('input[name="email"]');
const $url = $('input[name="url"]');
const $comment = $('textarea[name="w"]') || $('textarea[name="text"]') || $('textarea[name="comment"]');
const randomValue = [
'写的不错,很有深度,令人信服。',
'又在折腾了啊,我都没了折腾的精力。',
'感同身受。',
'👍 6的一批,支持一个~',
'好久不见,还在创作啊。',
'悄悄留个足迹,表示我来过~',
'我倒,你也在网上冲浪啊',
'你是 GG 还是 MM 啊',
'来跑堂了,假装路过~'
];
$author.value = '你的昵称';
$mail.value = '你的邮箱';
$url.value = '你的网站';
$comment.value = randomValue[
Math.ceil(Math.random() * randomValue.length - 1)
];
})();
@maicong
Copy link
Author

maicong commented Apr 10, 2018

压缩版,添加到书签

javascript:(function(){var a=function(g){return document.querySelector(g)||null},b=a('input[name="author"]'),c=a('input[name="mail"]')||a('input[name="email"]'),d=a('input[name="url"]'),e=a('textarea[name="w"]')||a('textarea[name="text"]')||a('textarea[name="comment"]'),f=['\u5199\u7684\u4E0D\u9519\uFF0C\u5F88\u6709\u6DF1\u5EA6\uFF0C\u4EE4\u4EBA\u4FE1\u670D\u3002','\u53C8\u5728\u6298\u817E\u4E86\u554A\uFF0C\u6211\u90FD\u6CA1\u4E86\u6298\u817E\u7684\u7CBE\u529B\u3002','\u611F\u540C\u8EAB\u53D7\u3002','\uD83D\uDC4D 6\u7684\u4E00\u6279\uFF0C\u652F\u6301\u4E00\u4E2A~','\u597D\u4E45\u4E0D\u89C1\uFF0C\u8FD8\u5728\u521B\u4F5C\u554A\u3002','\u6084\u6084\u7559\u4E2A\u8DB3\u8FF9\uFF0C\u8868\u793A\u6211\u6765\u8FC7~','\u6211\u5012\uFF0C\u4F60\u4E5F\u5728\u7F51\u4E0A\u51B2\u6D6A\u554A','\u4F60\u662F GG \u8FD8\u662F MM \u554A','\u6765\u8DD1\u5802\u4E86\uFF0C\u5047\u88C5\u8DEF\u8FC7~'];b.value='你的昵称',c.value='你的邮箱',d.value='你的网站',e.value=f[Math.ceil(Math.random()*f.length-1)]})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment