This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·101 lines (94 loc) · 5.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-153595643-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-153595643-4');
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta property="og:url" content="https://badwiki.textgen.cloud" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Bad-Wiki" />
<meta property="og:description" content="Bad WiKi definitions for your input, generated by AI" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="https://storage.googleapis.com/dadler_gpt2_data/e-gayon-icon.png" />
<title>Bad-Wiki</title>
<meta name="description" content="Bad-Wiki is an automatic text generator. It creates nonsense definitions for the terms you provide.">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.3/css/mdb.min.css" rel="stylesheet">
</head>
<body dir="ltr">
<div dir="ltr" class="container" style="display: inline-block; text-align: left">
<h1 dir="ltr" class="my-2 mx-lg-2">Bad-Wiki</h1>
<h2 dir="ltr" class="my-2 mx-lg-2">Nonsense definitions for the terms you provide</h2>
<div dir="ltr" class="px-lg-2 pt-0">
<form dir="ltr" class="md-form" style="color: #757575;">
<div dir="ltr" class="d-flex justify-content-end"></div>
<textarea dir="ltr" name="text_in" class="form-control md-textarea" rows="1" id="textarea_in" autofocus
placeholder="Write something here, like a term you wish to be defined or even a full name of someone you know. You can also leave it blank and be surprized."
onkeypress="process(event, this)"></textarea>
<button dir="ltr" class="btn btn-outline-primary waves-effect" type="submit">Define</button>
</div>
<textarea readonly dir="ltr" name="text_out" class="form-control md-textarea" rows="5" id="textarea_out"
placeholder=""></textarea>
<!-- <div dir="ltr" style="display: flex; justify-content: center" id="shareBtn" class="btn btn-success clearfix">Funny? Share!</div> -->
</form>
</div>
<hr>
<p dir="ltr" style="text-align:center;">The languange model was fine tuned by <a href="https://twitter.com/Norod78">Doron Adler</a><br/>
</p>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.2.1/js/bootstrap.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.7.3/js/mdb.min.js"></script>
<script>
// Key Press Listener Attachment for #area.
function process(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13) { //Enter
// revent the default event.
event.preventDefault();
// Get the message value, stripping any newline characters.
$('form').submit();
}
}
$('form').on('submit', function (e) {
texarea_out = $('textarea#textarea_out')
texarea_out.select()
e.preventDefault();
texarea_out.val("Please wait...")
$.post(window.location.href, $(this).serialize(), function (data) {
console.log('Horray, the definition is ready')
texarea_out.val("Horray, the definition is ready")
console.log(data)
texarea_out.val(data)
$('form').select()
$("#textarea_in").focus()
});
});
/*
document.getElementById('shareBtn').onclick = function() {
texarea_out = $('textarea#textarea_out')
share_text = texarea_out.val
FB.ui({
display: 'popup',
method: 'share',
quote: share_text,
href: 'https://e-gayon.com',
}, function(response){});
}
*/
</script>
</body>
</html>