Skip to content

Commit

Permalink
Add Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Nov 18, 2021
1 parent 4722a44 commit 1f03c78
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
"Skia",
"slotchange",
"smodel",
"Smore",
"SNDREC",
"soundrec",
"spritesheet",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Includes:
* ![](images/icons/winamp2-16x16.png) Winamp 2.9 ([separate README](programs/winamp/README.md); [original repository](https://github.com/captbaritone/webamp)) by [Jordan Eldredge](https://jordaneldredge.com/)
* ![](images/icons/folder-open-16x16.png) Windows Explorer / ![](images/icons/internet-explorer-16x16.png) Internet Explorer ([separate README](programs/explorer/README.md))
* ![](images/icons/chm-16x16.png) Help Viewer
* 📎 Clippy ([original repository](https://github.com/smore-inc/clippy.js))

Features:
* Drop files onto the desktop, and they'll be stored in a virtual filesystem
Expand Down
3 changes: 3 additions & 0 deletions desktop/CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Calculator by:
Windows Calculator engine developers
https://github.com/microsoft/calculator

Clippy by Smore:
https://github.com/smore-inc/clippy.js

--------------------------------------
Assets
======--------------------------------
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link href="layout.css" rel="stylesheet" type="text/css">
<link href="lib/os-gui/layout.css" rel="stylesheet" type="text/css">
<link href="lib/os-gui/windows-98.css" rel="stylesheet" type="text/css">
<link href="lib/clippy.js/build/clippy.css" rel="stylesheet" type="text/css">
<link href="classic.css" rel="stylesheet" type="text/css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=LbWArJzeO7">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=LbWArJzeO7">
Expand Down Expand Up @@ -51,6 +52,7 @@ <h2 style="font-family: cursive; font-size: 1em; color: gray; margin: 0; margin-
</div>
<script src="lib/jquery.min.js"></script>
<script src="lib/browserfs.js"></script>
<script src="lib/clippy.js/build/clippy.js"></script>
<script src="lib/konami.js"></script>
<script src="lib/os-gui/parse-theme.js"></script>
<script src="lib/os-gui/MenuBar.js"></script>
Expand Down
7 changes: 5 additions & 2 deletions src/window-switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,12 @@
if (Task.all_tasks.length < 2) {
return;
}
// @TODO: Clippy
if (!notice_shown) {
alert("It looks like you're trying to use Alt+Tab to switch between windows.\n\nUse Alt+` (grave accent) instead within the 98.js desktop.\n\nAlso, use Alt+4 instead of Alt+F4 to close windows.");
clippy.load("Clippy", function (agent) {
agent.show();
const message = "It looks like you're trying to use Alt+Tab to switch between windows.\n\nUse Alt+` (grave accent) instead within the 98.js desktop.\n\nAlso, use Alt+4 instead of Alt+F4 to close windows.";
agent.speak(message, true);
});
notice_shown = true;
}
}
Expand Down

0 comments on commit 1f03c78

Please sign in to comment.