Camustc's Blog

Subscribe to RSS feed

Tabs for DS Browser

, , ,

Though I've known for a long time about using javascript in the DS Browser's address menu, I had never thought or heard of using longer scripts as bookmarks. Then recently I learned about bookmarklets when I found out about rkm's Wand. I was amazed that someone had given the browser a new feature in a way I had never thought possible.

This exciting new discover gave me another idea. Why not grant the browser other features it lacks through javascript? Luckily, despite my mediocre programming knowledge, javascript is one I feel slightly confident enough to use. But out of all things I wanted, audio (I think the DS browser should at least support midi by default), Flash, AJAX (maybe it has this, I don't remember), copy/paste, etc., tabs were the only thing easy enough.

And so that's what I ended up making. The code probably looks ugly, and it's got some issues, but I'd still like to share it. Maybe someone else might take a look and improve upon it in the future. The source code link is on the bottom of this page.

Setup As Bookmarklet:

Click go to the link on this page (you'll know it worked if the location bar changes to something really long), then go to the bookmark menu

Add the link then go to edit mode and edit the link location

Delete everything that appears before "javascript" and save changes

Also, if you want, change the bookmark title to something like "Tab Mode" and set "force overview mode"

Using The Tabs:

It's best to use the bookmarklet on a fresh start to avoid freezing.

Go to a webpage other than the start page or help page, since they only appear in SSR, then go to the bookmark that was made

Lastly, whatever page you were on will appear in the first tab after everything loads

Features:

-Create up to five tabs
-Each tab has an address bar and Google search bar (Send and proceed works so clicking "Go" or "Search" isn't required)

Known Issues:

-BIGGEST ISSUE (so far), Upon opening a page in another tab, scrolling only works by using the scroll bar or direct event mode dragging the page
-All tabs show up in SSR mode (seems like it ignores all CSS including display:none)
-Changing to SSR after running the script freezes the browser
-Going to URLS with a bookmark or the built-in address menu sometimes freezes the browser
-Some web pages take over the whole screen (So far I've seen it on Hotmail and Gmail sometimes)
-Some web pages don't render correctly (Only happened on deviantart.com)
-Location bar on top screen shows correct URL when loading pages, but afterwards shows the location of the first page the script started on
-Couldn't get rkm's Wand to recognize any page sad

Interesting Stuff:

-The built-in back and forward buttons work on one tab at a time (I expected it to just go back to the page before the script started)
-Reloading the same page in a different tab doesn't require downloading the images, the other tab acts as a cache for it

----

In the future I hope to figure out how to add independent back and forward buttons for each tab. So far however, using history.back() and history.forward() on the frames works the same as the built-in buttons so I'm stuck. Anyways, I hope people have fun with this despite the glaring faults.

Lastly, here's the code for anyone interested Tabs for DS Browser Code