asdf
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ function makeEvent(information)
|
|||||||
});
|
});
|
||||||
|
|
||||||
request.execute(function(event) {
|
request.execute(function(event) {
|
||||||
alert('Event created: ' + event.htmlLink);
|
console.log('Event created!');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -7,6 +7,11 @@ function directionsURL(inCommand) {
|
|||||||
var dest = inCommand.substring(startOfTo+3).replace(" ", "+"); // "14872 Waverly Lane, Irvine, CA" to "14872 Waverly Lane+Irvine+CA"
|
var dest = inCommand.substring(startOfTo+3).replace(" ", "+"); // "14872 Waverly Lane, Irvine, CA" to "14872 Waverly Lane+Irvine+CA"
|
||||||
var link = "https://www.google.com/maps/embed/v1/directions?key=AIzaSyCZCgZY7ZlSMk1DW0NEEoHZ9qwdSL4AR1k&origin="+origin+"&destination="+dest
|
var link = "https://www.google.com/maps/embed/v1/directions?key=AIzaSyCZCgZY7ZlSMk1DW0NEEoHZ9qwdSL4AR1k&origin="+origin+"&destination="+dest
|
||||||
mapsFrame.src = link;
|
mapsFrame.src = link;
|
||||||
mapsFrame.style.display = "block";
|
$('#map').delay(3000).fadeIn();
|
||||||
var d = '';
|
$('#search-cont').delay(2700).animate({'margin-top' : '-=200px'});
|
||||||
|
$('#input').mousedown(function() {
|
||||||
|
$('#map').fadeOut(500);
|
||||||
|
$('#search-cont').animate({'margin-top' : '+=200px'});
|
||||||
|
$('#input').unbind();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
+5
-1
@@ -2,10 +2,12 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>DoEverythingBar</title>
|
<title>DoEverythingBar</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="main.css">
|
<link rel="stylesheet" type="text/css" href="main.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@@ -20,14 +22,16 @@
|
|||||||
<div class="input-group stylish-input-group">
|
<div class="input-group stylish-input-group">
|
||||||
<input type="text" id="input" class="form-control" placeholder="Search" >
|
<input type="text" id="input" class="form-control" placeholder="Search" >
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
|
<image id="fire" src="images/error.png">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<span id="enter" class="glyphicon glyphicon-upload"></span>
|
<span id="enter" class="glyphicon glyphicon-upload"></span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<iframe
|
<iframe
|
||||||
height="100%"
|
height="100%"
|
||||||
width="100%"
|
width="100%"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ div.main-bg {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
margin-right: -50%;
|
margin-right: -50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stylish-input-group .input-group-addon{
|
.stylish-input-group .input-group-addon{
|
||||||
@@ -43,3 +44,14 @@ div.main-bg {
|
|||||||
border:0;
|
border:0;
|
||||||
background:transparent;
|
background:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fire {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 16px;
|
||||||
|
right: 30px;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 10;
|
||||||
|
height: 15px;
|
||||||
|
width: 15px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,17 +4,30 @@ var signoutButton = document.getElementById('signout-button');
|
|||||||
|
|
||||||
var runCommandBtn = document.getElementById('create-event');
|
var runCommandBtn = document.getElementById('create-event');
|
||||||
enterBtn.addEventListener("click", captureInput);
|
enterBtn.addEventListener("click", captureInput);
|
||||||
|
window.addEventListener("keypress", function(e) {
|
||||||
|
var key = e.which || e.keycode;
|
||||||
|
if (key == 13) {
|
||||||
|
captureInput();
|
||||||
|
}
|
||||||
|
});
|
||||||
var actualCommand = '';
|
var actualCommand = '';
|
||||||
var command = '';
|
var command = '';
|
||||||
|
|
||||||
function captureInput() {
|
var dict = {
|
||||||
var dict = {
|
"gcal": makeEvent,
|
||||||
"gcal": makeEvent,
|
"googlecalendar": makeEvent,
|
||||||
"googlecalendar": makeEvent,
|
"mapsd": directionsURL,
|
||||||
"mapsd": directionsURL,
|
"directions": directionsURL
|
||||||
"directions": directionsURL
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
function error() {
|
||||||
|
$('#fire').slideDown();
|
||||||
|
$('#input').mousedown(function() {
|
||||||
|
$('#fire').slideUp();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function captureInput() {
|
||||||
var input = String(document.getElementById("input").value);
|
var input = String(document.getElementById("input").value);
|
||||||
var untilSpace = input.indexOf(' ');
|
var untilSpace = input.indexOf(' ');
|
||||||
command = input.substring(0, untilSpace);
|
command = input.substring(0, untilSpace);
|
||||||
@@ -23,21 +36,30 @@ function captureInput() {
|
|||||||
if (command in dict) {
|
if (command in dict) {
|
||||||
console.log('isAValidCommmand');
|
console.log('isAValidCommmand');
|
||||||
actualCommand = input.substring(untilSpace+1);
|
actualCommand = input.substring(untilSpace+1);
|
||||||
runCommandBtn.addEventListener("click", function () {
|
|
||||||
console.log('successfully ran command');
|
|
||||||
dict[command](actualCommand);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (gapi.auth2.getAuthInstance().isSignedIn.get()) {
|
if (actualCommand == '') {
|
||||||
console.log('already signed in');
|
console.log('actualCommand is empty!!');
|
||||||
runCommandBtn.click();
|
error();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
authorizeButton.click();
|
else if (gapi.auth2.getAuthInstance().isSignedIn.get()) {
|
||||||
setTimeout(alert("Run Command again!"), 1000);
|
console.log('already signed in');
|
||||||
}
|
runCommandBtn.addEventListener("click", runCommand);
|
||||||
|
function runCommand() {
|
||||||
|
console.log('successfully ran command');
|
||||||
|
dict[command](actualCommand);
|
||||||
|
}
|
||||||
|
runCommandBtn.click();
|
||||||
|
runCommandBtn.removeEventListener("click", runCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
authorizeButton.click();
|
||||||
|
setTimeout(console.log("Run Command again!"), 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert.log("Not a valid command");
|
console.log("Not a valid command");
|
||||||
|
error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head></head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript" src="https://secure.skypeassets.com/i/scom/js/skype-uri.js"></script>
|
||||||
|
<div id="SkypeButton_Call_justinkimchi77_1">
|
||||||
|
<script type="text/javascript">
|
||||||
|
Skype.ui({
|
||||||
|
"name": "call",
|
||||||
|
"element": "SkypeButton_Call_justinkimchi77_1",
|
||||||
|
"participants": [""]
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user