Bookmarklet to reintroduce ... "#3"!!! (navigate to top/bottom)

Forums » Opera for mobiles/devices » Opera Mini

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

8. June 2010, 01:42:20

nttrllg-2o

Posts: 114

Bookmarklet to reintroduce ... "#3"!!! (navigate to top/bottom)

Ok it's not exactly the same as "#3", but if you place this bookmarklet at "*3", it's almost as good ... bigsmile
javascript:/*location.href="http://Navigate/"*/(function(){d=document;l=d.location.toString();b=d.body;a=function(s){return'<a%20name="'+s+'"%20id="'+s+'"><\/a>';};q=prompt("Navigate to: (t:top,b:bottom)","");if(q){if(!d.getElementById('oNBtom'))b.innerHTML=a('oNTop')+b.innerHTML+a('oNBtom');switch(q){case"t":case"T":l=l.replace(/^([^#]+).*/,"$1#oNTop");break;case"b":case"B":l=l.replace(/^([^#]+).*/,"$1#oNBtom");break;}location.href=l;}})();


8. June 2010, 01:52:42

nttrllg-2o

Posts: 114

I have now updated my opera blog page to include this new bookmarklet with the other 6.

8. June 2010, 02:45:55

tommy-vercetti

end user

Posts: 149

Thats cool man..thanks very much

8. June 2010, 06:55:15

miyuru

Posts: 1070

Great work. But unfortunately does not work on my non-touch device.
-----
"Don't tell me that sky is the limit when I already see footsteps on the moon !"

Quarrel for the improvement of Opera Mini!

Discuss on mobile stuff:
<a href="http://www.mobileroyale.co.cc">Mobile Royale - Mobile News & Downloads</a>

8. June 2010, 08:38:35

Jammet

Posts: 108

On the iphone OM, this gives me the top of the page, but it is all blank white and I have to reload the entire page. =/

9. June 2010, 04:09:34

nttrllg-2o

Posts: 114

If the bookmarklet isn't working for you in some cases, it's probably because of one of the following:

1, The page has a zoomed overview.
Details: It's just a bookmarklet. It has no access to OM5's scrolling API (i.e. sorry to disappoint you but it's not really #3 p)
2, The page you are on is not the last page you visited (e.g. you've used "back" to go back in history.)
Details: document.location, document.URL, and location.href in OM5 doesn't return the displayed page's url when going back in history, and this bookmarklet needs that url to be correct for it to work.
3, The page was left on screen for too long.
Details: I have no idea why. I'm not even sure what'd consider as being "too long". What I observed was that when I try to retrieve document.location after a certain period, it returns the bookmarklet as the result instead of the page's url.
4, ... more?

(2) and (3) may be bugs of OM5 (probably to squeeze more memory). As for (1) ... I'm not sure how to get around that sad

9. June 2010, 16:25:35

SAGRID

Posts: 2753

A practical problem: address javascript:x has more than 450 characters so cant be bookmarked on some SE phones.
God's In His Heaven, All's Right With The World

Forums » Opera for mobiles/devices » Opera Mini