forked from nettleweb/nettleweb
-
Notifications
You must be signed in to change notification settings - Fork 0
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
f1081c7
commit 67a9b82
Showing
16 changed files
with
3,356 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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,9 @@ | ||
@import url("/common.css"); | ||
|
||
body>div { | ||
position: absolute; | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} |
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="referrer" content="no-referrer" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | ||
<link rel="stylesheet" type="text/css" href="index.css" /> | ||
<title>Graphing Calculator</title> | ||
</head> | ||
<body> | ||
<div>Loading...</div> | ||
<script type="text/javascript" src="main.js"></script> | ||
</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,34 @@ | ||
"use strict"; (async ({ window: win, document: doc }) => { | ||
if (doc.readyState !== "complete") { | ||
await new Promise((resolve) => { | ||
const callback = () => { | ||
if (doc.readyState === "complete") { | ||
doc.removeEventListener("readystatechange", callback); | ||
setTimeout(resolve, 1000, null); | ||
} | ||
}; | ||
doc.addEventListener("readystatechange", callback, { passive: true }); | ||
}); | ||
} | ||
|
||
const body = doc.body; | ||
|
||
win.stop(); | ||
win.focus(); | ||
body.innerHTML = "Loading... (1)"; | ||
|
||
const e = doc.createElement("script"); | ||
e.type = "text/javascript"; | ||
e.src = "calculator.js"; | ||
e.async = true; | ||
e.defer = true; | ||
|
||
e.onload = () => { | ||
const e = doc.createElement("div"); | ||
body.innerHTML = ""; | ||
body.appendChild(e); | ||
win.Desmos.GraphingCalculator(e); | ||
}; | ||
|
||
body.appendChild(e); | ||
})(window); |
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 @@ | ||
index.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 @@ | ||
index.html |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="referrer" content="no-referrer" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
<base href="/" target="_blank" /> | ||
<title>NettleWeb Search</title> | ||
</head> | ||
<body> | ||
<div>Loading...</div> | ||
<script type="text/javascript" src="search.js"></script> | ||
</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,56 @@ | ||
"use strict"; (async ({ window: win, document: doc }) => { | ||
if (doc.readyState !== "complete") { | ||
await new Promise((resolve) => { | ||
const callback = () => { | ||
if (doc.readyState === "complete") { | ||
doc.removeEventListener("readystatechange", callback); | ||
setTimeout(resolve, 500, null); | ||
} | ||
}; | ||
doc.addEventListener("readystatechange", callback, { passive: true }); | ||
}); | ||
} | ||
|
||
const loc = win.location; | ||
const body = doc.body; | ||
|
||
const q = (new URLSearchParams(loc.search).get("q") || "").trim(); | ||
if (q.length === 0) { | ||
loc.replace("/"); | ||
return; | ||
} | ||
|
||
win.stop(); | ||
win.focus(); | ||
doc.title = q + " - NettleWeb Search"; | ||
body.innerHTML = "<div class=\"gcse-search\"></div>"; | ||
|
||
Object.defineProperty(win, "history", { | ||
value: Object.freeze(Object.setPrototypeOf({ | ||
get state() { | ||
return null; | ||
}, | ||
get length() { | ||
return 0; | ||
}, | ||
get scrollRestoration() { | ||
return "auto"; | ||
}, | ||
go: () => void 0, | ||
back: () => void 0, | ||
forward: () => void 0, | ||
pushState: () => void 0, | ||
replaceState: () => void 0 | ||
}, null)), | ||
writable: false, | ||
enumerable: true, | ||
configurable: false | ||
}); | ||
|
||
const e = doc.createElement("script"); | ||
e.type = "text/javascript"; | ||
e.src = "https://cse.google.com/cse.js?cx=6505c81d738124627"; | ||
e.async = true; | ||
e.defer = true; | ||
body.appendChild(e); | ||
})(window); |