Archive for the ‘javascript’ Category

JavaScript Date Add Function

Posted on: October 28th, 2013 by admin No Comments

I think doing anything with dates is horrible in JavaScript compared to PHP but here is a function to make adding x days to a date a little easier: function dateAdd(theDate, numDays) {   /** * Date must be YYYY-MM-DD or DD-MM-YYYY – other formats will not work */   numDays = parseInt(numDays);   if(theDate.indexOf("/") […]

Easily find specific block from ID in huge list of Drupal 6 blocks

Posted on: February 8th, 2013 by admin No Comments

Ever tried to find a specific block from it’s ID in a huge list of blocks in Drupal 6 admin? As it only shows block title, not ID’s in the admin screen it can be really tricky. This bookmarklet changes the configure link on the /admin/build/block page so it says the ID of the block […]