Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This will be our nonexhaustive todo list for Holy Unblocker LTS v6.x.x and above
- [ ] Add booksmark menu (source wise already present pretty much)
- [ ] Add Chii + ensuring users can access devtools while browsing - partial
- [ ] Setting to open multiple stealth frames; basically about:blank but using our system. Pops out in another tab
- [ ] Omnibox should state what the current site the user is on like a proper URL bar
- [x] Omnibox should state what the current site the user is on like a proper URL bar
- [ ] Improve adblocking functions on site using Workerware + a pre-bundled uBlock Origin
- [ ] Add a "website self-destruct" button to the settings menu
- [ ] Transport Options Swapping on Frame (Settings Menu doesn't swap)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 25 additions & 5 deletions views/assets/js/common-1735118314.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@ const preparePage = async () => {
prGo1 = document.querySelectorAll(`#${id}.pr-go1, #${id} .pr-go1`),
prGo2 = document.querySelectorAll(`#${id}.pr-go2, #${id} .pr-go2`);

const frame = document.getElementById('frame');
if (prUrl && frame && frame.src) {
prUrl.value = decodeURIComponent(frame.src.split('/').pop());
}

// Handle the other menu buttons differently if there is no omnibox. Menus
// which lack an omnibox likely use buttons as mere links.
const goProxMethod = prUrl
Expand Down Expand Up @@ -782,12 +787,27 @@ const preparePage = async () => {
prSet('pr-wa', 'wikipedia');
prSet('pr-ng', 'newgrounds');

// Load the frame for stealth mode if it exists.
const windowFrame = document.getElementById('frame'),
loadFrame = () => {
windowFrame.src = localStorage.getItem('{{hu-lts}}-frame-url');
return true;
// Update omnibox when frame location changes
const windowFrame = document.getElementById('frame');
if (windowFrame) {
const omniboxes = document.querySelectorAll('[id^="pr-"] input[type=text]');
let lastUrl = '';
const updateOmnibox = () => {
const url = decodeURIComponent(windowFrame.contentWindow.location.href.split('/').pop());
if (url !== lastUrl) {
lastUrl = url;
omniboxes.forEach((input) => { input.value = url; });
}
requestAnimationFrame(updateOmnibox);
};
requestAnimationFrame(updateOmnibox);
}

// Load the frame for stealth mode if it exists.
const loadFrame = () => {
windowFrame.src = localStorage.getItem('{{hu-lts}}-frame-url');
return true;
};
if (windowFrame) {
if (uvConfig && sjObject)
(await callAfterWorkers(
Expand Down