Skip to content

Commit

Permalink
🐛 Do not reload website on position change
Browse files Browse the repository at this point in the history
  • Loading branch information
lmachens committed Jan 15, 2022
1 parent 4014db4 commit 665aa16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skeleton",
"version": "1.7.0",
"version": "1.7.1",
"description": "Simply add any website in customizable windows",
"main": "src/main.js",
"author": "Leon Machens",
Expand Down
6 changes: 4 additions & 2 deletions src/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ window.addEventListener("DOMContentLoaded", () => {
const heightOffset = crop.top + crop.bottom;

const iframe = document.querySelector("#child");
iframe.src = website.url;
document.title = website.name;
if (!iframe.src) {
iframe.src = website.url;
document.title = website.name;
}
iframe.style = `top: ${-crop.top}px; left: ${-crop.left}px; right: ${-crop.right}px; width: calc(100% + ${widthOffset}px); bottom: ${-crop.bottom}px; top: ${-crop.top}px; height: calc(100% + ${heightOffset}px);`;
});

Expand Down

0 comments on commit 665aa16

Please sign in to comment.