-
Notifications
You must be signed in to change notification settings - Fork 0
/
index3.html
174 lines (164 loc) · 5.27 KB
/
index3.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html>
<head>
<title> SimpleModal OSX Style Dialog </title>
<meta name='author' content='Eric Martin' />
<meta name='copyright' content='2013 - Eric Martin' />
<!-- Page styles -->
<link type='text/css' href='css/demo.css' rel='stylesheet' media='screen' />
<!-- OSX Style CSS files -->
<link type='text/css' href='css/osx.css' rel='stylesheet' media='screen' />
<!-- JS files are loaded at the bottom of the page -->
</head>
<body>
<div id='container'>
<div id='logo'>
<h1>Simple<span>Submitter</span></h1>
<span class='title'>Free Website Submitter</span></div>
<div id='content'>
<div id='osx-modal'>
<h3>Free Traffic Visitor</h3>
<div id='vueApp'>
<div class='container'>
<div class='row'>
<div class='col-md-6'>
<div class='card'>
<div class='card-body'>
<form v-on:submit.prevent='goJinx'>
<div class='form-group'>
<label class='label-control' for='inputUrl'>Accept URL http(s)://</label>
<input class='form-control' id='inputUrl' name='url' required='true' type='text' v-model='target.url'/>
</div>
<div class='row'>
<div class='col-md-6'>
<div class='form-group'>
<label class='label-control' for='inputTraffic'>Traffic / sec. (default)</label>
<input class='form-control' id='inputTraffic' name='traffic' required='true' type='number' v-model='target.traffic' />
</div>
</div>
<div class='col-md-6'>
<div class='form-group'>
<label class='label-control' for='inputMsg'>Leave feedback msg :</label>
<input class='form-control' id='inputMsg' name='message' required='true' type='text' v-model='target.msg'/>
</div>
</div>
</div>
<button class='btn btn-raised btn-primary' id='btn-send' type='submit' v-if='status.isState == false' >Send Traffic</i></button>
<a class='btn btn-danger' href='javascript:void(0)' id='btn-stop' v-else='' v-on:click='jinxStop' >Stop</i></a>
</form>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='card'>
<div class='card-body'>
<h3>Result</h3>
<table class='table table-striped table-hover'>
<tr>
<td><b class='text-warning'>Requested</b></td>
<td>: <b>{{ status.requested }}</b></td>
</tr>
<tr>
<td><b class='text-success'>Success</b></td>
<td>: <b>{{ status.success }}</b></td>
</tr>
<tr>
<td><b class='text-danger'>Failed</b></td>
<td>: <b>{{ status.failed }}</b></td>
</tr>
</table>
</div>
</div>
</div>
<p>Inspired by <a href="">ModalBox</a>, an OSX style dialog built with <a href='http://www.prototypejs.org/ '>prototype</a>.</p>
<input type='button' id='btn-send' name='osx' class='osx demo' value="Ping Url"/> or <a href="https://github.com/alfazzafashion/SimpleSubmitter" alt="smallseo">Fork on Github</a>
</div>
<!-- modal content -->
<div id='osx-modal-content'>
<div id='osx-modal-title'>Website Submitter Dialog </div>
<div class='close'><a href='#' class='simplemodal-close'>Close</a></div>
<div id='osx-modal-data'>
<p>Enter Domain (without http:// or https://)</p>
<input type='text' name='domain' class='js-sitename' placeholder='mysite.com'/>
<button class='js-start'>Ping Now</button>
<p><button class='simplemodal-close'>Cancel</button><span>(or press ESC or click the overlay)</span></p>
</div>
</div>
</div>
<div id='footer'>
© <script type="text/javascript">var creditsyear = new Date();document.write(creditsyear.getFullYear());</script> <a href='http://www.ericmmartin.com/'>Eric Martin</a> | <a href='https://github.com/ericmmartin/simplemodal'>SimpleModal on GitHub</a> |
<a href='http://twitter.com/ericmmartin'>@ericmmartin</a> | <a href='http://twitter.com/simplemodal'>@simplemodal</a>
</div>
</div>
<!-- Load JavaScript files -->
<script type='application/ld+json'></script>
<script type='text/javascript' src='js/jquery.js'></script>
<script type='text/javascript' src='js/jquery.simplemodal.js'></script>
<script type='text/javascript' src='js/osx.js'></script>
<script type='text/javascript' src='js/script.js'></script>
<script type='text/javascript' src='js//vue.js'></script>
<script>
//<![CDATA[
var jinxInt;
var vueJingling = new Vue({
el: '#vueApp',
data: {
target: {
'url': '',
'traffic': 0,
'msg': ''
},
status: {
'isState': false,
'requested': 0,
'success': 0,
'failed': 0
},
reqHash: []
},
methods: {
onReq: function(rid) {
this.status.requested++
},
onComplete: function(rid) {
delete this.reqHash[rid];
},
onFail: function(rid) {
this.status.success++
delete this.reqHash[rid];
},
onSuccess: function(rid) {
this.status.success++
delete this.reqHash[rid];
},
goJinx: function() {
var vm = this;
this.status.isState = true;
jinxInt = setInterval(this.httpReq, (10000 / parseInt(this.target.traffic) | 0));
},
jinxStop: function() {
clearInterval(jinxInt);
this.status.isState = false;
},
httpReq: function() {
var vm = this;
if (this.status.requested > this.status.success + this.status.failed + 10000) {
return;
}
var rID = Number(new Date());
var img = new Image();
img.onerror = function() {vm.onFail(rID)};
img.onabort = function() {vm.onFail(rID)};
img.onload = function() {vm.onSuccess(rID)};
img.setAttribute("src", this.target.url + "?id=" + rID + ";msg=" + this.target.msg);
this.reqHash[rID] = img;
this.onReq(rID);
}
},
mounted: function() {
}
});
//]]>
</script>
</body>
</html>