This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f98aeb7
commit fb65228
Showing
5 changed files
with
100 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#browser-html, #browser-body { | ||
height: 100%; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
#browser-body { | ||
margin: 0; | ||
display: -moz-box; | ||
-moz-box-orient: vertical; | ||
width: 100%; | ||
height: 100%; | ||
background-color: #000; | ||
} | ||
|
||
#browser-tab { | ||
-moz-box-flex: 1; | ||
display: -moz-box; | ||
-moz-box-orient: vertical; | ||
} | ||
|
||
#browser-toolbar { | ||
background-color: #666; | ||
display: -moz-box; | ||
-moz-box-orient: horizontal; | ||
width: 100%; | ||
height: 30px; | ||
margin: 0; | ||
} | ||
|
||
#browser-address { | ||
background-color: #333; | ||
border-radius: 5px; | ||
-moz-box-flex: 1; | ||
display: -moz-box; | ||
-moz-box-orient: horizontal; | ||
height: 20px; | ||
margin: 5px; | ||
padding: 0; | ||
} | ||
|
||
#browser-url { | ||
-moz-box-flex: 1; | ||
border: none; | ||
border-radius: 5px; | ||
height: 16px; | ||
padding: 2px 5px; | ||
} | ||
|
||
.browser-button { | ||
display: block; | ||
padding: 0 4px; | ||
} | ||
|
||
#browser-iframe { | ||
-moz-box-flex: 1; | ||
width: 100%; | ||
border: none; | ||
background-color: white; | ||
} |
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,25 @@ | ||
<!DOCTYPE html> | ||
<html id="browser-html"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Browser</title> | ||
<link rel="stylesheet" href="browser.css" type="text/css" /> | ||
<script type="text/javascript" src="../apps.js"></script> | ||
<script type="text/javascript" src="browser.js"></script> | ||
</head> | ||
|
||
<body id="browser-body"> | ||
<div id="browser-tab"> | ||
<div id="browser-toolbar"> | ||
<form id="browser-address"> | ||
<input type="text" id="browser-url" value="https://wiki.mozilla.org/B2G"> | ||
<input type="image" src="images/go.png" id="browser-go-button" class="browser-button" alt="Go"> | ||
</form> | ||
</div> | ||
<iframe id="browser-iframe" src="https://wiki.mozilla.org/B2G"> | ||
</iframe> | ||
</div> | ||
</body> | ||
|
||
</html> |
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,14 @@ | ||
window.onload = function() { | ||
var go = document.getElementById("browser-go-button"); | ||
go.addEventListener("click", Browser.navigate, false); | ||
|
||
} | ||
|
||
var Browser = { | ||
navigate: function(event) { | ||
var url = document.getElementById("browser-url").value; | ||
var iframe = document.getElementById("browser-iframe"); | ||
iframe.setAttribute("src", url); | ||
event.preventDefault(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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