Bookmark page with Javascript

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Posts: 58
Joined: November 21st, 2013, 4:22 pm

Post Posted May 17th, 2015, 9:37 am

Hi, I'm looking to write a Javascript function to bookmark a page in Firefox (v38.0.1).
I've searched around on the web and this forum and I've found the following one but actually the "addPanel" function has been deprecated a long time ago ( and in Scratchpad I get the exception "Exception: TypeError: window.sidebar.addPanel is not a function".
Moreover the bookmark created was opening (in old FF versions) in the sidebar and not in the full window.

Is there a way to make it work with another function or is this a no solution problem?

I wish many thanks to everybody will be so kind to help me out with this.



User avatar
Posts: 39908
Joined: August 22nd, 2005, 7:25 am

Post Posted May 17th, 2015, 11:14 am

To my knowledge there is no solution. Access to chrome (the UI) is strictly prohibited and only possible for addons not pages.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Posts: 34
Joined: June 13th, 2013, 4:27 am

Post Posted April 18th, 2016, 5:54 am

Try this function:
function add_bookmrk(url,page_title) {
alert(' !!! ');
javascript:function add_bookmark(url,page_title){location.href=url}CreateBookmarkLink();void(0);
alert(' ??? ');
WordPress Developer Miami providing best WordPress Websites for small businesses.

Return to Web Development / Standards Evangelism

Who is online

Users browsing this forum: No registered users and 2 guests