Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added qs scraping and the search bar
- Loading branch information
Dan Silivestru
committed
Jul 7, 2012
1 parent
b511a3a
commit 1b3e379
Showing
9 changed files
with
84 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,13 @@ body { | |
a { | ||
color: #00B7FF; | ||
} | ||
|
||
#address { | ||
width:80%; | ||
height: auto; | ||
font-size: 2em; | ||
} | ||
|
||
#go { | ||
font-size: 2em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
<html> | ||
<head> | ||
<title>emulate.phonegap.com</title> | ||
<link rel="stylesheet" href="/css/style.css" /> | ||
<link rel="stylesheet" href="css/style.css" /> | ||
<script src="js/index.js"></script> | ||
</head> | ||
<body> | ||
<div class="header"> | ||
<img src="/images/cordova_bot.png" alt="" /> | ||
<section class="header"> | ||
<img src="images/cordova_bot.png" alt="" /> | ||
+ | ||
<img src="/images/ripple.png" alt="" /> | ||
<img src="images/ripple.png" alt="" /> | ||
= | ||
<img src="/images/FUCK-YEAH.jpg" alt="" /> | ||
</div> | ||
<img src="images/FUCK-YEAH.jpg" alt="" /> | ||
</section> | ||
|
||
<div> | ||
This is a quick prototype of some thoughts on emulate.phonegap.com | ||
</div> | ||
<section id="navigate" style="display: none"> | ||
<input id="address" type="text" /> | ||
<button id="go">GO</button> | ||
</section> | ||
|
||
<div> | ||
<a href="/guid_1234/index.html?enableripple=true">Link to sample hosted app</a> | ||
</div> | ||
<section id="browser-warning" style="display: none"> | ||
OMFG, you needz to be on chrome | ||
</section> | ||
|
||
<section id="ripple-warning" style="display: none"> | ||
OMFG, you needz the ripples | ||
</section> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
var netherworld = { | ||
hasRipplez: function () { | ||
return document.getElementById("tinyhippos-injected"); | ||
}, | ||
|
||
goto: function (uri) { | ||
//TODO: Test if window.chrome exists on chromium | ||
if (window.chrome && netherworld.hasRipplez()) { | ||
//TODO: ensure that enableripple=cordova | ||
|
||
if (!uri.match("enableripple")) { | ||
uri += uri.match(/\?/) ? "&enableripple=cordova" : "?enableripple=cordova"; | ||
} | ||
|
||
if (!uri.match("^http")) { | ||
uri = "http://" + uri; | ||
} | ||
console.log(uri); | ||
|
||
//window.location.href = uri; | ||
} | ||
}, | ||
|
||
show: function (id) { | ||
document.getElementById(id).setAttribute("style", ""); | ||
}, | ||
|
||
hide: function (id) { | ||
document.getElementById(id).setAttribute("style", "display: none"); | ||
} | ||
|
||
}; | ||
|
||
window.addEventListener("load", function () { | ||
if (!window.chrome) { | ||
console.log("asdf"); | ||
netherworld.show("browser-warning"); | ||
} | ||
else if (!netherworld.hasRipplez()) { | ||
console.log("ffda"); | ||
netherworld.show("ripple-warning"); | ||
} | ||
else { | ||
netherworld.show("navigate"); | ||
|
||
if (window.location.search) { | ||
var uri = decodeURI(window.location.search.split("=")[1]); | ||
netherworld.goto(uri); | ||
} | ||
} | ||
|
||
document.getElementById("go").addEventListener("click", function () { | ||
var address = document.getElementById("address"); | ||
netherworld.goto(address.value); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.