Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyHamachi committed Feb 25, 2024
1 parent 92c447e commit d27f000
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
14 changes: 14 additions & 0 deletions tab/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ img {
pointer-events: none;
user-select: none;
}

.img-selectable {
pointer-events: all !important;
user-select: all !important;
}

[constHide],
[hide] {
display: none !important;
Expand Down Expand Up @@ -107,21 +109,33 @@ img {
.code-menu {
position: relative;
}

.code-menu-container-absolute {
position: absolute;
top: 0;
right: 0;
}

.code-menu-container-relative {
position: relative;
top: 0;
right: 0;
}

.help-open {
position: fixed;
right: 0;
bottom: 0;
margin-right: 15px;
margin-bottom: 15px;
z-index: 999;
}

.scroll-up {
position: absolute;
right: 0;
bottom: 0;
margin-right: 15px;
margin-bottom: 15px;
z-index: 999;
}
7 changes: 6 additions & 1 deletion tab/html/focus.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
<div class="uk-width-expand">
<div class="uk-flex uk-flex-right uk-flex-middle">
<div>
<img CapturePreview uk-img uk-toggle="target: #modal-CapturePreview" uk-tooltip="title: CapturedImage; pos: bottom">
<img CapturePreview uk-img uk-toggle="target: #modal-CapturePreview"
uk-tooltip="title: CapturedImage; pos: bottom">
<div id="modal-CapturePreview" uk-modal class="uk-modal-container">
<div class="uk-modal-dialog uk-modal-body">
<button class="uk-modal-close-outside" type="button" uk-close></button>
Expand Down Expand Up @@ -142,6 +143,10 @@
<mark-down src="/docs/help/Tails.md"></mark-down>
</div>
</div>

<div class="uk-text-right scroll-up">
<button ScrollUp class="uk-icon-link" uk-icon="chevron-up" uk-tooltip="Scroll up"></button>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions tab/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
<mark-down src="/docs/LICENSE.md"></mark-down>
</div>
</div>

<div class="uk-text-right scroll-up">
<button ScrollUp class="uk-icon-link" uk-icon="chevron-up" uk-tooltip="Scroll up"></button>
</div>
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions tab/js/focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ import { BlueFoxJs } from "/modules/BlueFoxJs/bluefox.es.min.js";
);
});
},
"[ScrollUp]": async ($) => {
$.element.addEventListener("click", async (event) => {
let modal_body = document.querySelector("#modal-overflow > div .uk-modal-body");
modal_body.scrollBy({
top: modal_body.scrollHeight * -1,
left: modal_body.scrollWidth * -1,
behavior: "smooth",
});
});
},
});
await BlueFoxJs.Sync.view();

Expand Down
12 changes: 11 additions & 1 deletion tab/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,17 @@ window.BlueFoxScript = class extends BlueFoxScript {
);
menu.append(button);
$.element.className ? $.element.parentElement.prepend(menu) : $.element.append(menu);
}
},
"[ScrollUp]": async ($) => {
$.element.addEventListener("click", async (event) => {
let modal_body = document.querySelector("#modal-overflow > div .uk-modal-body");
modal_body.scrollBy({
top: modal_body.scrollHeight * -1,
left: modal_body.scrollWidth * -1,
behavior: "smooth",
});
});
},
});
BlueFoxJs.Sync.view();
}
Expand Down

0 comments on commit d27f000

Please sign in to comment.