banner



How to create a dynamic bookmark with today's date in the URL - valliereslosicessir

I love bookmarks! As a matter of fact, I honey them thus a lot that I massed more than than cardinal blest bookmarks. Information technology sounds like total topsy-turvydom but nearly of them are sorted carefully in folders. If you want to look into how many bookmarks you have saved in your Chrome account, all you indigence to do is visit this link.

Screenshot 2015-06-01 22.37.25

Although bookmarks make it easy to die down to frequently visited sites, they aren't unmitigated. For example, I visit a number of reports in Google Analytics and Facebook to check on important data. Most of the times, I'm interested in the data of the current sidereal day. Now, the problem is that the site URL in the bookmark only includes the day I created the bookmarker and non the day I'm interested in. This means that I accept to manually adjust the report's particular date to get to the numbers I'm looking for. I know, it may sound as if I'm overreacting but if you open 5 different reports at once, you get annoyed pretty rapidly.

If you have it away what I mean and suffer as much as I do, and so I have a solution that will automate the physical process of getting today's prospect of a website (as long as the date is part of the URL). The solvent here is to expend a bookmarklet that does the task for you.

Using bookmarklets to change the engagement in a URL to today's

Bookmarklets are some sort of mini applications for your web browser, written in JavaScript and provide extra functionalities. You crapper find a ton of detailed contentedness on Google if you privation to read much about bookmarklets.

In that fastidious case, we bequeath use a bookmarklet that gets nowadays's date, puts it into a Uniform resource locator and opens it in your browser. In essence, it consists of a single JavaScript function that takes care of that process. You don't have to have any programming knowledge to use this bookmarklet. All you need to do is to replace whatsoever bits of the code under:

javascript:function url() {  var date = untested Date();  var y = engagement.getFullYear();   volt-ampere m = date.getMonth() +1;   if(m < 10){m = '0' + m;}  volt-ampere d = go steady.getDate();  if(d < 10){d = '0' + d;}  var date =                          y + "-" + m + "-" + d            ;   take                          '            https://www.google.com/analytics/web/?authuser=0#my-reports/XXXXXXXX/XXXXXXXXXXX/%3F_u.date00%3D              '            +                          appointment                        +              '            %26_u.date01%3D              '            +                          escort                        +              '            /              '            ;  } window.open(url(),"_blank");

Here's what you need to do make this work:

  1. Copy the JavaScript code above into a copyreader of your choice. It's easier to adjust it there before saving it as a bookmark.
  2. Check the date in the Uniform resource locator you want to prepar active. How is IT formatted? With a hyphenate between the numbers or all at once (eg. 2015-12-21 or 20151221). If it's the erstwhile and then you don't pauperism to adjust the date stamp in the code. If it's the latter, you need to change the start blue-blooded bit to y + m + d . Au fon, you pauperism to remove these 2 bits ' + "-" + '.
  3. The date is probably gonna be somewhere midmost of your URL. Therefore we need to separate the Uniform resource locator where the date should come in. In the example you derriere project that the URL is separated using the single quotation mark ( ' ) and the day of the month is concatenated with plus signs (+). Replace the example with your own URL and split information technology up and add engagement consequently.
  4. Throw convinced to put a single quotation mark at the beginning and end of the Uniform resource locator as shown in the example.

Saving the code into a bookmarker

When you retrieve that you replaced the requisite parts correctly, you lav save the code as a bookmarker and try information technology kayoed.

  1. Right snap on an already existing bookmark (ilk the uncomparable to your reputation).
  2. Select 'Edit'.
  3. Empty the URL field.
  4. Copy the code in your copyreader and paste it into the empty URL field.
  5. Select 'Salve'.
  6. Click on the bookmark. If you did it right, the URL should open upwards in a recent tab in your browser with nowadays's see selected.

Screenshot 2015-06-02 00.28.04

I hope you start information technology to turn on your opening try and get to enjoy the wizard of bookmarklets. If not, you can always revisit the steps or check the loaded URL for mistakes and fix them in your code. Also, feel relinquish to drop a comment if you're stuck.

Source: https://trendblog.net/how-to-create-a-dynamic-bookmark-with-todays-date-in-the-url/

Posted by: valliereslosicessir.blogspot.com

0 Response to "How to create a dynamic bookmark with today's date in the URL - valliereslosicessir"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel