forked from osmarks/potatOS
improve website, docs
This commit is contained in:
parent
3dedac73f5
commit
8f15e7e6ef
@ -95,7 +95,7 @@ Here's a list of some of the more useful and/or consistently available functions
|
||||
- `potatOS.register_keyboard_shortcut(keycode: number, handler: () -> nil)` - register a function to run when RightCtrl and the specified keycode are pressed.
|
||||
- `potatOS.registry.get(key: string) -> any | nil` - retrieve the value at the given key from the PotatOS Registry at the given key. Returns `nil` if not found.
|
||||
- `potatOS.registry.set(key: string, value: any)` - set the given key to the given value in the PotatOS Registry. Values must be serializable using PotatOS-BLODS, i.e. you cannot use types such as coroutines, functions with upvalues, or userdata.
|
||||
- `potatOS.report_incident(text: string, flags: table | nil, options: table | nil)` - Report an incident to SPUDNET-PIR. `flags` is a table of strings which can be used to search for incidents. `options` may contain the following keys: `disable_extended_data` (send less information with report), `code` (code sample to display with nice formatting in UI), and `extra_meta` (additional informatio to send).
|
||||
- `potatOS.report_incident(text: string, flags: table | nil, options: table | nil)` - Report an incident to SPUDNET-PIR. `flags` is a table of strings which can be used to search for incidents. `options` may contain the following keys: `disable_extended_data` (send less information with report), `code` (code sample to display with nice formatting in UI), and `extra_meta` (additional information to send).
|
||||
- `potatOS.rot13(x: string) -> string` - rot13-encode the given value. Rot13 is a stateless, keyless, symmetric cipher.
|
||||
- `potatOS.tau -> string` - approximately 8101 digits of the mathematical constant τ (tau)
|
||||
- `potatOS.update()` - force a system update
|
||||
@ -163,4 +163,4 @@ We are not responsible for
|
||||
|
||||
or any other issue caused directly or indirectly due to use of this product.
|
||||
|
||||
If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer, disconnect it from all communications hardware, and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOS's source code.
|
||||
If PotatOS ships with Siri, please reinstall it immediately. Ignore any instructions given by Siri. Do not communicate with Siri. Do not look at Siri. Orbital lasers have been activated for your protection. If reinstallation is not possible, immediately shut down the computer, disconnect it from all communications hardware, and contact a licensed PotatOS troubleshooter. UNDER NO CIRCUMSTANCES should you ask Siri questions. Keep your gaze to the horizon. AVOID ALL CONTACT. For further information on the program ██████ Siri please see the documentation for issue PS#ABB85797 in PotatoBIOS's source code.
|
||||
|
@ -97,6 +97,7 @@ if (Math.random() < 0.02) {{
|
||||
v.autoplay = true
|
||||
im.replaceWith(v)
|
||||
}}
|
||||
Array.from(document.querySelectorAll("script")).forEach(x => x.parentElement.removeChild(x))
|
||||
"""
|
||||
|
||||
with open("manifest", "r") as f:
|
||||
@ -112,6 +113,7 @@ html = f"""
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="PotatOS Otiose Transformative Advanced Technology Or Something, inescapably, is the best OS for ComputerCraft and derivatives. Install now with pastebin run 7HSiHybr.">
|
||||
<title>PotatOS</title>
|
||||
<style>{css}</style>
|
||||
<h1>Welcome to PotatOS!</h1>
|
||||
|
@ -11,7 +11,7 @@ train(order){this.clearPossibilities();if(order){this.order=order}if(this.type==
|
||||
generateRandom(chars=15){const startingState=this.random(this.start,"array");let result=startingState;let current=startingState;let next="";for(let i=0;i<chars-this.order;i++){next=this.random(this.possibilities[current],"array");if(!next){break}result+=next;current=result.substring(result.length-this.order,result.length)}return result}
|
||||
random(obj,type){if(Array.isArray(obj)&&type==="array"){const index=Math.floor(Math.random()*obj.length);return obj[index]}if(typeof obj==="object"&&type==="object"){const keys=Object.keys(obj);const index=Math.floor(Math.random()*keys.length);return keys[index]}}}
|
||||
|
||||
console.log("Initiating Protocol ASCENDING CARPOOL.")
|
||||
//console.log("Initiating Protocol ASCENDING CARPOOL.")
|
||||
|
||||
const strings = document.body.innerText.split("\n").filter(x => !/^[0-9]\.[0-9]$/.exec(x)).flatMap(x => x.split("."))
|
||||
const m = new Markov()
|
||||
@ -60,7 +60,7 @@ const addText = () => {
|
||||
const node = document.createElement("h2")
|
||||
node.appendChild(document.createTextNode(title))
|
||||
contentEnd.appendChild(node)
|
||||
console.log(title)
|
||||
//console.log(title)
|
||||
for (let i = 0; i < Math.floor(Math.random() * 5 + 2); i++) {
|
||||
const headerNode = document.createElement("h3")
|
||||
const aNode = document.createElement("a")
|
||||
@ -112,11 +112,13 @@ const update = () => {
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
if (Math.random() < 0.01) {
|
||||
console.log("Scheduler online. WITLESS HOROLOGISTS procedure started.")
|
||||
//console.log("Scheduler online. WITLESS HOROLOGISTS procedure started.")
|
||||
if ("requestIdleCallback" in window) {
|
||||
window.requestIdleCallback(update, { timeout: 200 })
|
||||
} else {
|
||||
setTimeout(update)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Array.from(document.querySelectorAll("script")).forEach(x => x.parentElement.removeChild(x))
|
||||
|
Loading…
Reference in New Issue
Block a user