-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
160 lines (131 loc) · 5.34 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
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
<!DOCTYPE html>
<html>
<head>
<style>
/* Styling for the main container */
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f7f7f7;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* Styling for the input field */
textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}
/* Styling for buttons */
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
/* Styling for information paragraphs */
#info p {
margin: 5px 0;
}
/* Styling for the phone number display */
#phoneNumberDisplay {
font-size: 20px;
font-weight: bold;
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<script>
var phoneNumbers = []; // Array to store entered phone numbers
var currentIndex = 0; // Index to keep track of the current number being called
function addPhoneNumber() {
// Get the phone numbers entered by the user and split them into an array
var phoneNumbersInput = document.getElementById("phoneNumber").value.trim();
// Check if the input is not empty
if (phoneNumbersInput !== "") {
// Split the input into an array of phone numbers (one per line)
var numbersArray = phoneNumbersInput.split('\n');
// Add each phone number to the array
for (var i = 0; i < numbersArray.length; i++) {
phoneNumbers.push(numbersArray[i]);
}
document.getElementById("phoneNumber").value = ''; // Clear the input field
displayPhoneNumber(); // Display the entered phone numbers
}
}
function displayPhoneNumber() {
// Display the current phone number and options (Start/Next)
var phoneNumberElement = document.getElementById("phoneNumberDisplay");
if (currentIndex < phoneNumbers.length) {
phoneNumberElement.innerHTML = phoneNumbers[currentIndex];
if (displayFlag != 1){
document.getElementById("startButton").style.display = "block";
document.getElementById("nextButton").style.display = "none";
} else {
document.getElementById("startButton").style.display = "none";
document.getElementById("nextButton").style.display = "block";
}
} else {
phoneNumberElement.innerHTML = "No more phone numbers.";
document.getElementById("startButton").style.display = "none";
document.getElementById("nextButton").style.display = "none";
}
// Display additional information
document.getElementById("totalNumbers").innerHTML = "Total Numbers: " + phoneNumbers.length;
document.getElementById("numbersCalled").innerHTML = "Numbers Called: " + currentIndex;
document.getElementById("numbersRemaining").innerHTML = "Numbers Remaining: " + (phoneNumbers.length - currentIndex);
}
var displayFlag = 0
function startCall() {
// Construct the Skype URI and open the Skype call link
var skypeUri = 'skype:' + phoneNumbers[currentIndex];
window.location.href = skypeUri;
currentIndex++;
displayFlag = 1;
displayPhoneNumber();
}
function nextCall() {
// Trigger the next call
startCall();
}
</script>
</head>
<body>
<div class="container">
<h2>Make Skype Ca1ls</h2>
<h3>A simple automation for Calling Multiple Numbers</h3>
<div>
<!-- Input field for entering phone numbers -->
<label for="phoneNumber">Enter Phone Numbers (one per line):</label>
<textarea id="phoneNumber" rows="4" cols="50"></textarea><br>
<button onclick="addPhoneNumber()">Add Phone Numbers</button>
<!-- Display additional information -->
<div id="info">
<p id="totalNumbers">Total Numbers: 0</p>
<p id="numbersCalled">Numbers Called: 0</p>
<p id="numbersRemaining">Numbers Remaining: 0</p>
</div>
<!-- Display the phone numbers and buttons -->
<div><br></div>
<div class="phoneNumberDisplay" id="phoneNumberDisplay"></div>
</div>
<button id="startButton" onclick="startCall()" style="display:none;">Start Call</button>
<button id="nextButton" onclick="nextCall()" style="display:none;">Next</button>
</div>
</body>
</html>