Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 28 Oct 2026 - @895.45
Forum Activity: Four Stars Random | Recent Posts | Guild Recents
News: :wizard: You can make anything on the web! :wizard: Guild Events: Halloween Watch-a-thon
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Embedding browser elements into a page


« previous next »
Pages: [1] Print Embed
Author Topic: Embedding browser elements into a page  (Read 25 times)
IndigoGolem
Sr. Member ⚓︎
****
View Profile WWW


What's personal text?
⛺︎ My Room
RSS: RSS
OS: Debian GNU/Linux

Guild Memberships:
Artifacts:
squeezed gentlyVisited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Joined 2025!
« on: Today at @771 » Embed

I use a custom startpage for my browsers that's made mostly of SVG (i find Inkscape easier than hand-coding CSS, and i don't need especially good code for something that'll only ever be on my screen). It currently is just input boxes for search engines, and links with icons to sites i visit often. But since i figured out how to use Firefox' browser toolbox, i've been doing stuff with userChrome.css (custom CSS for styling the browser itself) and i'd like to offload more buttons to the custom startpage.

Today i figured, Firefox' UI looks like XML. So i should be able to just copy and paste that into the HTML for my startpage. It's not that simple, unfortunately.

I'm starting with my bookmarks toolbar. It's not hard to open the browser toolbox (burger menu > More Tools > Browser Toolbox) then use its element inspector to grab the thing i want. Find the highest element in the tree that's just the thing i want, right click > Edit As XML, select all, copy, paste into the HTML for the page. And nothing happens. Add some CSS, now there's a border around the XML so i can see that it is in the page, it's just invisible. display and visibility properties don't help, so it's probably that the browser doesn't know how to render it here because it's missing important stuff i didn't copy into the page. Or it just won't do XML like this, but the fact that the element is in the page and can be styled makes me think that's not it.

So i clean up and indent the code, just so it's a little easier to read and work with. The idea here is i can pick out all the ids of various elements and search the browser toolbox to see what targets those. The element highest up the tree is a <toolbaritem id="personal-bookmarks">, so i search the debugger for that id. I don't know any JS, but the code is commented so i can try to understand anyway. Exploring a little instead of copying bits of code right away, i see "This object handles the initialization and uninitialization of the bookmarks toolbar. It also has helper functions for the managed bookmarks button." Sounds like what i need.

I'm getting tired of this so i just copy the whole JS file and link it with a <script> tag. The page still doesn't work. So i do the same with the other JS files that mention that id. Still doesn't work. At this point i'm hungry and tired of this and ready to admit defeat.

So this thread is a request for help and not a tutorial. Has what i'm trying to do been done before? Is it definitely impossible? Does a known solution exist?

I guess even if this isn't possible i could probably use userChrome.css to position and style the bookmarks bar and make it only visible on that page. I think that's a thing.

Logged

-Indigo, Anve Ozo

Artifact Swap: spinning CDVaporfactSpiritual Stone of Firee  unus, pluriumMelonPaintMick Jagger's mouthPuzzlingCreampuffEyeSeeYou2 coinsThe fingerSeven SnailsGold OreHeptase GlyphsMoth CreatureOdd CreatureSanriosnail buddy
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
The Worm is creeping around Melonland profiles!Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #1 on: Today at @826 » Toggle Font Embed

Yes, Firefox's user interface is implemented in XML! If I remember correctly, the specific dialect it uses is called XUL (pronounced like Zuul, the evil demigoddess from Ghostbusters). You can absolutely style it with CSS and it should pretty-much Just Work so long as you do a lot of heavy lifting.

However, doing any kind of clever interactivity probably won't work like you want. You can't just take some JavaScript that normally runs "in the browser" and ask it to run "in a webpage". If that JavaScript's purpose is to, say, load all of your bookmarks and render them... that simply won't work when run from a webpage, because your browser will refuse to give up your bookmarks to the code. That's an important security feature: you wouldn't want just any webpage to be able to see what pages you have bookmarked, would you?

If I'm understanding you right: you want to design a custom homepage that includes your bookmarks (and possibly other data)? If so, a good starting point might be to explore the places Firefox stores your profile data, or ask it to export the data you want. E.g. if you set browser.bookmarks.autoExportHTML in your about:config the Firefox will automatically maintain an (old, Netscape-style) HTML file with a list of your bookmarks every time you quit (IIRC), right in your profile folder: neat! Might be a launchpad for your explorations.

Or if I've misunderstood what you're trying to achieve, let me know!

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif https://origami.danq.dev/88x31.gif https://skelly.monster/dem-bones-88x31.gif

Artifact Swap: Pink ham-ham rangerPolyamorousI met Dan Q on Melonland!shoeJoined 2025!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe