Google Chrome extension which dynamically updates bookmarks based on the specified regular expression
- Installation
- Introduction
- Overcoming Custom URL Notation
- Bookmark manager
- What next?
- FAQ
- Support
- License
- Click here
- Select Add to chrome
- Enjoy!
- Download or clone current repository
- Navigate to the downloaded folder and run
npm init
in console (ex. cmd/terminal/PowerShell) (Note: you will need to have node.js installed on your computer) - Once node_modules is installed run
npm run build
to create production build (ornpm run dev
for development one) - On your browser search page type in (navigate to)
chrome://extensions/
- In the now opened
chrome://extensions/
page turn on the developer mode - Expand the Developer dropdown menu (if needed) and press
Load unpacked
button - Navigate to the downloaded/cloned local folder of this repository, select
build
folder and click Ok - Assuming there are no errors, the extension should load into your browser
Let's start by clicking on the extension icon on the top right.
Upon clicking a button, form with automatically filled input form will be shown.
While Bookmark name, and Url fields are self-explanatory, you might be wondering what does RegExp
(short for regular expression) field represent?
It simply is a sequence of characters that define a search pattern. Ever did CTRL+F to find something on the page? Well, it's pretty much the same thing, but with extra special characters that let your search be more flexible.
Once the form is submitted a dynamic bookmark will be created inside Other bookmarks
folder.
Congrats! You have successfully created your first dynamic bookmark!
In most cases, you won't even have to worry about the RegExp
field since the automatically generated value will be good enough, but you might run into rare occasions where the site will be using unique URL notation which would require manual entry of this field.
An example of such a site is animekisa.tv
. Let's see how we can generate regular expressions using a very simple tactic.
First, let's click on few episodes:
https://animekisa.tv/mo-dao-zu-shi-season-2-episode-3
https://animekisa.tv/mo-dao-zu-shi-season-2-episode-4
Now ask yourself, what part stays the same? - animekisa.tv/mo-dao-zu-shi-season-2
And that would be our value for the RegExp
field!
So we created our bookmark, but what if we had a lot of bookmarks. How will we know which ones are tracked / dynamic and which ones aren't? What if we wanted to stop tracking? What if we wanted to maybe change our regular expression? Etc. For these reasons a new extended bookmark manager which focused on these problems had to be made.
You open it by pressing on the Open Manager
tab inside a popup window
Once you open the bookmark manager, on the right, all of the bookmark files will be shown. For easier navigation dynamic bookmarks are shown in red color.
On the left side (side nav) you can see two main elements.
So let's take a closer look at each...
It might look naive, but this search bar is using regular expressions, allowing you to do ALOT of cool stuff. Here I will just list a few snippets/examples that you can use
https
- lists all https linkshttp[^s]
- all http links (without https)http[s]?://w{3}
- http or https links that start with wwwhttp[s]?://[^w]
- http/https links that DON'T start with wwwhttp[s]?://.*?\.com/
- http/https links whose domain name ends with .com^n
- all bookmarks with bookmark name starting with letter n (or N, by default it is not case sensitive)
To learn more about regular expression watch theNetNinja tutorial
This part should be pretty intuitive. It works exactly like Windows Explorer. By clicking on arrow or double-clicking on folder you open/close it, and if you click once on a folder you will see its content without toggling it, which is all of the bookmarks that are located inside it (no matter how deep, in my case it will also display children of WebDesignSites folder).
To help guide you visually, folders with purple color will contain dynamic / tracked bookmarks which are, as we saw previously filled with red color.
Clicking on the folder also selects it, which lets you add/edit/delete it as we will see later, same goes for clicking on a bookmark.
note: you can't edit or delete Bookmark bar and Other bookmarks folders because they are special folders created by chrome
There are two ways to select bookmark:
- Clicking on it through side nav
- By pressing on right most icon from the main section
Selecting a bookmark will display the following:
- title - the name of the bookmark
- url - URL of the page that bookmark is currently pointing to (clickable)
- parent - the name of the parent folder. (clickable)
- regExp - regular expression (will be hidden if it is not a dynamic bookmark)
- history - history of 10 most recent links that bookmark was pointing to (for dynamic bookmarks only)
You might have noticed that edit and delete buttons have become available once you clicked on a bookmark. Let's have a look at what they do...
This one is most straightforward out of them all. It deletes currently selected element whether if it is folder or bookmark. If you cannot delete a folder (ex. Other bookmarks and Bookmarks bar) it will be greyed out and you won't be able to click it.
There are two different scenarios upon pressing the edit button:
- Folder is selected - it will prompt you with a form to change its name
- Bookmark is selected - it will prompt you with a form to change name, URL or regular expression
Deleting regular expression will UNTRACK the bookmark!
To open this one hover over it.
Here you are offered two options:
- Add folder (topmost icon)
- Add bookmark
Both will prompt a modal form for you to fill.
New bookmark/folder will be created inside the currently selected directory.
There is one more thing left to cover. By now you may be wondering: How do I move bookmark/folder? Well, it's super easy. Simply click on it, and while holding the left mouse button, drag it over to the parent folder and release. That's it! :)
Reminder: You can't move Other bookmarks and Bookmarks bar because they are special chrome folders which can't be changed
It would be good to learn regular expressions because knowing them will let you take full advantage of this extension.
My recommendations are The Coding Train and theNetNinja. You can also use the search bar to experiment with regular expressions.
If you have questions that aren't answered in FAQ you can contact me at Linkedin or by (preferably) posting an issue on GitHub. The same goes for if you have an additional idea on how to improve this extension.
- What is regExp?
regExp
(short for the regular expression) is a rule upon which it is determined if the URL that you are currently on should be updated.- For example, let's say that your
regExp
wascrunchyroll.com/gintama
. - If you were on a
http://www.crunchyroll.com/gintama/episode-182-screw-popularity-votes-534414
, then that link would match ourregExp
becausecrunchyroll.com/gintama
is contained in this URL, and in turn, our bookmark would be updated. - But if you were on, let's say,
https://github.com/DaniloNovakovic/chrome-dynamic-bookmarks
, then it would NOT match ourregExp
, hence our bookmark would not be updated.
Reach out to me at one of the following places!
- Website at
danilonovakovic.github.io
- Linkedin at
DaniloNovakovic
- MIT license
- Copyright 2018 Β© DaniloNovakovic