Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Oct 28, 2021
1 parent e32aec0 commit 3712035
Show file tree
Hide file tree
Showing 27 changed files with 806 additions and 807 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<meta name="apple-mobile-web-app-title" content="98.js">
<meta name="application-name" content="98.js">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#008080">
<meta name="theme-color" content="#008080">
<meta name="viewport" content="width=device-width, user-scalable=no">
<!-- For WayBack Machine, hopefully get it to save these resources -->
<link rel="prefetch" href="/filesystem-index.json">
Expand Down
26 changes: 13 additions & 13 deletions programs/calculator/menus.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

// TODO: bullet point style radio button menu items (instead of check marks)
var checkbox_for_view_mode = function(view_mode){
var checkbox_for_view_mode = function (view_mode) {
return {
check: function(){
check: function () {
// TODO
return view_mode === "standard";
},
toggle: function(){
toggle: function () {
// TODO
current_view_mode = view_mode;
},
Expand Down Expand Up @@ -53,11 +53,11 @@ var menus = {
"&Help": [
{
item: "&Help Topics",
action: function(){
action: function () {
var show_help = window.show_help;
try {
show_help = parent.show_help;
} catch(e) {}
} catch (e) { }
if (show_help === undefined) {
return alert("Help Topics only works when inside of the 98.js.org desktop.");
}
Expand All @@ -71,7 +71,7 @@ var menus = {
MENU_DIVIDER,
{
item: "&About Calculator",
action: function(){
action: function () {
// TODO: about dialog
window.open("https://github.com/muzam1l/mcalculator");
},
Expand All @@ -80,22 +80,22 @@ var menus = {
};

var go_outside_frame = false;
if(frameElement){
try{
if(parent.MenuBar){
if (frameElement) {
try {
if (parent.MenuBar) {
MenuBar = parent.MenuBar;
go_outside_frame = true;
}
}catch(e){}
} catch (e) { }
}
var menu_bar = new MenuBar(menus);
if(go_outside_frame){
if (go_outside_frame) {
$(menu_bar.element).insertBefore(frameElement);
$(function () {
$("body").addClass("menu-bar-is-outside-frame");
});
}else{
$(function(){
} else {
$(function () {
$(menu_bar.element).prependTo(jQuery("body"));
});
}
35 changes: 18 additions & 17 deletions programs/command/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<meta charset="utf-8">
<title>MS-DOS Prompt</title>
<style>
html, body {
html,
body {
width: 100%;
height: 100%;
margin: 0;
Expand Down Expand Up @@ -38,22 +39,22 @@
</div>
<script src="https://js-dos.com/cdn/js-dos-api.js"></script>
<script>
var dosbox = new Dosbox({
id: "dosbox",
onload: function (dosbox) {
dosbox.run("command-message.zip", "./msg.bat");
},
onrun: function (dosbox, app) {
document.querySelector("#dosbox .dosbox-loader").hidden = true;
document.querySelector("#dosbox .dosbox-loader").style.display = "none";
document.getElementById("dosbox").hidden = false;
console.log("App '" + app + "' started up");
},
onprogress: (stage, total, loaded) => {
console.log(stage, loaded * 100 / total + "%");
},
});
dosbox.ui.start.click();
var dosbox = new Dosbox({
id: "dosbox",
onload: function (dosbox) {
dosbox.run("command-message.zip", "./msg.bat");
},
onrun: function (dosbox, app) {
document.querySelector("#dosbox .dosbox-loader").hidden = true;
document.querySelector("#dosbox .dosbox-loader").style.display = "none";
document.getElementById("dosbox").hidden = false;
console.log("App '" + app + "' started up");
},
onprogress: (stage, total, loaded) => {
console.log(stage, loaded * 100 / total + "%");
},
});
dosbox.ui.start.click();
</script>
</body>
</html>
Loading

0 comments on commit 3712035

Please sign in to comment.