Skip to content
Permalink
Browse files

Wayback Machine shenanigans

  • Loading branch information
1j01 committed Jan 2, 2020
1 parent 4158bd6 commit fc82af73e6e0747a5e31c4104d98396f57719374
Showing with 26 additions and 1 deletion.
  1. +1 −0 index.html
  2. +21 −0 src/$IframeWindow.js
  3. +4 −1 src/programs.js
@@ -19,6 +19,7 @@
<!-- For Wayback Machine, hopefully get it to save these resources -->
<link rel="prefetch" href="/filesystem-index.json">
<link rel="prefetch" href="/desktop/CREDITS.txt">
<link rel="prefetch" href="/programs/notepad/index.html">
</head>
<body>
<div class="desktop" style="background-image: url(images/clouds.jpg); background-size: cover; background-position: center;"></div>
@@ -64,6 +64,27 @@ function $IframeWindow(options){
$win.focus();
// focus_window_contents();

const wb_embedded = iframe.contentDocument.querySelector(".wb_embedded");
if (wb_embedded){
wb_embedded.classList.remove("wb_embedded")
var error_element = iframe.contentDocument.querySelector("#error")
error_element.style.position = "absolute";
error_element.style.left = "0";
error_element.style.right = "0";
error_element.style.top = "0";
error_element.style.bottom = "0";
error_element.style.background = "#c0c0c0";
error_element.style.color = "#000";
error_element.style.padding = "50px";
var livewebInfo = iframe.contentDocument.querySelector("#livewebInfo.available");
livewebInfo.style.borderRadius = "0";
livewebInfo.style.border = "inset 2px #fff";
livewebInfo.style.background = "#ffffe0";
iframe.contentDocument.querySelector("#searchHome").style.display = "none";
iframe.contentDocument.querySelector("footer").style.display = "none";
iframe.contentDocument.querySelector("#errorBorder").style.width = "100%";
}

var $contentWindow = $(iframe.contentWindow);
$contentWindow.on("pointerdown click", function(e){
$win.focus();
@@ -11,7 +11,10 @@ function Notepad(file_path){
title: win_title
});
$win.onFocus(()=> {
$win.iframe.contentWindow.document.querySelector("textarea").focus();
const textarea = $win.iframe.contentWindow.document.querySelector("textarea");
if (textarea) {
textarea.focus();
}
});
return new Task($win);
}

0 comments on commit fc82af7

Please sign in to comment.
You can’t perform that action at this time.