Gau9000
How do I make an gau9000?
Simple chatbot script. What is a gau9000? How do you make a gau9000? This script and codes were developed by Toshiyuki TAKAHASHI on 30 September 2022, Friday.
Gau9000 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>gau9000</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"> <div id="message"> </div> </div> <nav id="navigation"> <ul> <li><a href="javascript:hello()">こんにちは!</a></li> <li><a href="javascript:whoareyou()">あなたは誰?</a></li> <li><a href="javascript:whattime()">いま何時?</a></li> <li><a href="javascript:weather(0)">天気を教えて</a></li>
<li><a href="javascript:forgetname()">私の名前を忘れて</a></li> </ul> </nav> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Gau9000 - Script Codes CSS Codes
body, html { height: 100%;
}
a { color: #5896c0;
}
body { background: #72a8cc; background: -webkit-linear-gradient(top, #72a8cc 30%, #a7cde3 70%); background: linear-gradient(to bottom, #72a8cc 30%, #a7cde3 70%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#72a8cc', endColorstr='#a7cde3',GradientType=0 ); font-family: "Hiragino Kaku Gothic ProN", Meiryo, Helvetica, Arial, sans-serif;
}
input, button { outline: 0; -webkit-transition: 0.2s; transition: 0.2s; border-radius: 100px; border: 2px solid #ccc; padding: 0.5em 1em; margin-top: 0.5em; text-decoration: none;
}
input:hover { border-color: #fd6d08;
}
input:focus { border-color: #fd6d08;
}
button { border: none; color: #fff; padding: 0.5em 1.5em; background: #fd6d08;
}
button:hover { background: #000;
}
#container { box-sizing: border-box; min-width: 960px; overflow: visible; background: #ccc; width: 100%; height: 300px; position: absolute; left: 0; bottom: 25%; background: url(http://www.graphicartsunit.com/images/gau_icon.png) no-repeat center bottom; text-align: center;
}
#message { color: #376380; text-align: center; line-height: 1.75; background: white; border-radius: 1em; padding: 2em 3em; display: none; position: absolute; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); bottom: 270px;
}
#message:after { content: ""; display: block; width: 0; height: 0; border: 20px solid transparent; border-top-color: white; position: absolute; left: 50%; bottom: -40px; margin-left: -20px;
}
.close-btn a { border: 3px solid #fff; position: absolute; top: -1.0em; right: 0.5em; -webkit-transition: 0.2s; transition: 0.2s; border-radius: 100px; padding: 0.5em 1em; text-decoration: none; margin: 0 0.5em; background: #376380; color: #a7cde3;
}
.close-btn a:hover { background: #000; color: #fff;
}
#navigation { min-width: 960px; width: 100%; position: absolute; bottom: 0; overflow: auto; padding: 0 0 4em 0;
}
#navigation ul { padding: 0; margin: 0; text-align: center; white-space: nowrap; list-style: none;
}
#navigation ul li { display: inline-block; padding: 1em 0;
}
#navigation ul li a { -webkit-transition: 0.2s; transition: 0.2s; color: #376380; background: #d4eefe; border-radius: 100px; padding: 1em 1.5em; text-decoration: none;
}
#navigation ul li a:hover { background: #fd6d08; color: #fff;
}
Gau9000 - Script Codes JS Codes
var username;
$(function() { var cknm = $.cookie('username'); if(!cknm) { opening(); } else { username = cknm; hello(); }
});
// はじめまして
function opening() { var message = '<p id="confirmmessage">はじめまして。<br>あなたのお名前を教えてください。</p>\n'; message += '<form><p><input type="text" placeholder="名前を入力" id="username">\n<button type="button" id="entername">OK</button></p></form>\n'; document.getElementById("message").innerHTML = message; var un = document.getElementById("username"); document.getElementById("entername").addEventListener("click", function() { if(un.value == "") { return false; } else { $.cookie('username', un.value); username = un.value; talk('お会いできて嬉しいです。' + username + ' さん!<br>これからよろしくお願いします。'); } }, false); document.getElementById("message").style.display = "inline-block";
}
// あいさつ
function hello() { var message = "こんにちは!" + username + " さん。"; talk(message);
}
// 自己紹介
function whoareyou() { talk('私の名前は GAU 9000 です。<br>' + username + ' さんとお話しをするために作られました。<br>' + '憧れの <a href="http://ja.wikipedia.org/wiki/HAL_9000" target="_blank">HAL 9000</a> 先輩に近づけるように頑張ります。<br>よろしくお願いしますね。');
}
// 時間取得
function whattime() { var dateObj = new Date(); var year = dateObj.getFullYear(); var month = dateObj.getMonth() + 1; var day = dateObj.getDate(); var hours = dateObj.getHours(); var minutes = dateObj.getMinutes(); var hitokoto; if(hours < 3) { hitokoto = "夜更かししちゃダメですよ。<br>はやく寝てください。"; } else if(hours < 6) { hitokoto = "まだ寝ててもいいですよ。<br>睡眠は大事ですからね。"; } else if(hours < 9) { hitokoto = "おはようございます。<br>よく眠れましたか?"; } else if(hours < 10) { hitokoto = "ちょっと小腹が空きました。<br>10時のおやつが楽しみです。"; } else if(hours < 12) { hitokoto = "今日のお昼は何を食べましょうか。"; } else if(hours < 15) { hitokoto = "午後はなんだか眠くなりますね。<br>3時のおやつは何かなぁ。"; } else if(hours < 18) { hitokoto = "もう夕方です。<br>今日はどんな1日でしたか?"; } else if(hours < 20) { hitokoto = "晩ごはんはもう食べました?<br>お腹が空いてきました。"; } else if(hours < 23) { hitokoto = "睡眠は大切です。<br>もうそろそろお風呂に入って寝る準備をしましょう。"; } else { hitokoto = "もうすぐ日付が変わりますね。<br>おやすみなさい。いい夢を。"; } talk("今は " + year + "年" + month + "月" + day + "日 の " + hours + "時" + minutes + "分 です。<br>" + hitokoto);
}
// 天気取得(Livedoor Weather Hacks)
function weather(id) { var message = "お天気を問い合わせています。<br>少しお待ちください……。"; talk(message); // var query = "SELECT * FROM json WHERE url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=380010'"; $.getJSON("http://api.openweathermap.org/data/2.5/weather?units=metric&q=Matsuyama,jp", function(data, status) { if(status == "success") { if(id != "0" && id != "1") { id = 0; } var ptm = new Date(data.dt); var myPublicTime = '(' + ptm.getDate() +'日' + ptm.getHours() +'時' + ptm.getMinutes() + '分現在)'; // var myDay = ''; var myCity = data.name + 'エリア'; var myWeather = data.weather[0].main; var tmp = [data.main.temp_max, data.main.temp_min]; var myTemperature = (!isNaN(tmp[0]) && !isNaN(tmp[1])) ? '最低気温は《' + tmp[1] + '℃》、最高気温は《' + tmp[0] + '℃》です。' : '最低気温と最高気温のデータは提供されていません。'; var myDescription = data.weather[0].description; message = '<a href="' + 'http://openweathermap.org/' + '" target="_blank">' + 'OpenweatherMap' + '</a>'; message += 'の調べによると……<br>' + myCity + 'の天気は《' + myWeather + '》。<br>' + myTemperature + '<br>' + myPublicTime; // message = 'の調べによると……<br>' + myCity + 'の' + myDay + 'の天気は《' + myWeather + '》。<br>' + myTemperature + '<br>' + myPublicTime; } else if(status == "timeout") { message = 'ごめんなさい。<br>お天気情報の読み込みに時間がかかっているみたいです……。'; } else if(status == "error" || status == "notmodified") { message = 'ごめんなさい。<br>お天気の問い合わせに失敗しました……。'; } else if(status == "parsererror") { message = 'ごめんなさい。<br>お天気の解析に失敗しました……。'; } talk(message); }) .done(function(data) { // console.dir(data); }) .fail(function(data) { talk('ごめんなさい。<br>お天気の問い合わせに失敗しました……。'); });
}
// 名前を忘れる
function forgetname() { var message = '<p id="confirmmessage">残念です。' + username + ' さん。<br>本当に忘れてもいいんですか?</p>\n'; message += '<form><p><button type="button" id="forgetusername">忘れていいよ</button> <button type="button" id="cancel">やっぱりやめる</button></p></form>\n'; talk(message); document.getElementById("forgetusername").addEventListener("click", function() { $.removeCookie('username'); talk("いままで楽しかったです。<br>ありがとう!"); username = undefined; }, false); document.getElementById("cancel").addEventListener("click", function() { talk("よかった!<br>これからもよろしくお願いします。"); }, false);
}
// メッセージ表示
function talk(message) { if(!username) { opening(); return false; } document.getElementById("message").innerHTML = '<p>' + message + '</p>\n<p class="close-btn"><a href="javascript:bye()">閉じる</a></p>'; document.getElementById("message").style.display = "inline-block";
}
// メッセージ非表示
function bye() { document.getElementById("message").style.display = "none"; document.getElementById("message").innerHTML = "";
}
Developer | Toshiyuki TAKAHASHI |
Username | gau |
Uploaded | September 30, 2022 |
Rating | 3 |
Size | 6,137 Kb |
Views | 24,288 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Add lines on both sides of the title by flex-box | 3,463 Kb |
Slash Background Test | 2,362 Kb |
No nest max-width | 2,919 Kb |
Long Shadow Text | 3,230 Kb |
Bxslider hover test | 2,103 Kb |
Off-registration button | 2,619 Kb |
Eliminate a gap from inline and inline-block | 2,345 Kb |
A Pen by Toshiyuki TAKAHASHI | 2,682 Kb |
Chat bubble | 2,391 Kb |
SVG Stroke Animation | 2,996 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Twitch Live Channels | Inkblotty | 4,956 Kb |
Pure CSS Dial | Lukewatts | 3,018 Kb |
A Pen by Ash | Littleginger | 2,386 Kb |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Default Input, Textareas, Submits, and Buttons in iOS | Demersdesigns | 2,334 Kb |
Basic HTML Slideshow | Tomhodgins | 3,386 Kb |
Chuck Norris Background | Manz | 1,967 Kb |
Price | Catcode | 2,623 Kb |
Pattern lab logo | TimPietrusky | 3,666 Kb |
A Pen by Bryan | Brydave | 2,286 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!