LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-24-2015, 08:10 PM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
How to import and backup bookmarks in firefox with javascript or php code?


We can import and backup bookmarks in firefox manually,
Can it be done by javascript or php code?
Please show me the code.
 
Old 12-25-2015, 05:22 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
just a nudge...

Let me give you a nudge (that's all I have, that's all you'll get)..
PHP...no, PHP runs on the server...forget PHP. Natively, Javascript cannot read local files when run in the sandbox of the browser...
HTML5 (combination of Javascript and more) could do it, provided the API support is in place:

Code:
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
  // Great success! All the File APIs are supported.
} else {
  alert('The File APIs are not fully supported in this browser.');
}
Then you need to find the place where the local OS stores the profiles. On Linux, look for the ".mozilla" folder...the dot is part of the name...
Parse the profiles item, hen look for the entry that says:
Quote:
Path=
What follows that is the name of the folder to dive into...
Once down there...look for the folder "bookmarkbackups"....choose what you want...the date is in the title/name...
It's JSON, so be aware that you may need to parse that too...
No code...just a nudge..., dont ask code, we dont provide code, snippets...perhaps, code...no, sorry....
Melissa
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 4 Import Bookmarks FredGSanford Linux - Software 1 03-29-2011 04:02 PM
[SOLVED] Import Firefox bookmarks to Chromium MTK358 Linux - Software 3 05-12-2010 01:03 PM
Want to import bookmarks into Firefox JosephS Slackware 12 01-16-2009 02:44 PM
Can you import Firefox bookmarks? k0lvert Linux - Software 5 11-02-2007 10:19 AM
Import/Export BookMarks of Mozilla/FireFox UFC Linux - Software 2 07-03-2006 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration