Reputation: 367
Scenario: A reporting tool run in our company has been upgraded to a newer version. It is being accessed by a URL in a browser: www.company.de/programm/v8/client/ The users were able to save browser bookmarks. I.e.: www.company.de/programm/v8/client/report1
The updated URL has changed (www.company.de/programm/new/v10/client/), thus letting all saved user-bookmarks resolve into nothingness.
My question: Is there a snippet for JS that either updates the URL string from "v8/" to "new/v10/" or at least scans to existing bookmarks inside the users bookmarks and adds new ones with a new URL (leaving the previous ones untouched)?
Upvotes: 0
Views: 1761
Reputation: 627
You actually can't change your bookmarks using javascript. The easiest way to do that is to change the bookmark file manually
The Chrome one for example is located here:
C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default\Bookmarks
Upvotes: 2
Reputation: 3511
No. You can not access the browser bookmarks though a webpage or in a JavaScript file within a web page.
But,
You can read more about the extension api in
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks
www.company.de/programm/v8/client/report1 -->
www.company.de/programm/new/v10/client/
through the same web server. Implementation is varying with the server you use. Just write a path matching rule.Upvotes: 2