let $help_window;
function show_help() {
if ($help_window) {
$help_window.focus();
return;
}
$help_window = open_help_viewer({
title: localize("Paint Help"),
root: "help",
contentsFile: "help/mspaint.hhc",
}).$help_window;
$help_window.on("close", ()=> {
$help_window = null;
});
}
// awkward shim to interface with my own stupid code
window.TITLEBAR_ICON_SIZE = 16;
window.$Icon = ()=> {
return $("");
};
// shared code with 98.js.org
// (copy-pasted for now)
function open_help_viewer(options){
const $help_window = $Window({
title: options.title || "Help Topics",
icon: "chm",
})
$help_window.addClass("help-window");
let ignore_one_load = true;
let back_length = 0;
let forward_length = 0;
const $main = $(E("div")).addClass("main");
const $toolbar = $(E("div")).addClass("toolbar");
const add_toolbar_button = (name, sprite_n, action_fn, enabled_fn)=> {
const $button = $("