--- phpx_tools/phpx_tools.install	(date 1451474798000)
+++ phpx_tools/phpx_tools.install	(revision )
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Install script for PHP execute extension module.
+ *  Install script for PHP execute extension module.
  */
 
 /**

--- phpx_tools/js/phpx_tools.js	(date 1451474798000)
+++ phpx_tools/js/phpx_tools.js	(revision )
@@ -1,21 +1,18 @@
 /**
  * @file
- * Defining behaviour for the user scripts and history entries table.
+ *  Defining behaviour for the user scripts and history entries table.
  */
 
 (function ($) {
-  'use strict';
 
   Drupal.behaviors.phpx_tools = {
     attach: function (context, settings) {
-      $('a.script-load').once().click(function (e) {
+      $('.phpx-tools a.script-load').once('phpx-load').click(function (e) {
         e.preventDefault();
 
         var $parent = $(this).parents('tr').eq(0);
         var $loadLink = $('.script-load', $parent);
         var $codeCell = $('#' + $loadLink.attr('rel'), $parent);
-        var $script_name = $('#edit-script-name');
-
         if (typeof codemirror != 'undefined' && typeof codemirror.editor != 'undefined') {
           codemirror.editor.setValue($codeCell.text());
         }
@@ -23,11 +20,14 @@
           $('#edit-code').val($codeCell.text());
         }
 
-        if ($script_name && $('#' + $loadLink.attr('rel') + '-name', $parent)) {
-          $script_name.val($('#' + $loadLink.attr('rel') + '-name', $parent).text());
+        var $scriptName = $('#edit-script-name');
+        var $load = $('#' + $loadLink.attr('rel') + '-name', $parent);
+
+        if ($script_name.length > 0 && $load.length > 0) {
+          $scriptName.val($load.text());
         }
       });
     }
-  };
+  }
 
 })(jQuery);


--- phpx_tools/phpx_tools.userscript.inc	(date 1451474798000)
+++ phpx_tools/phpx_tools.userscript.inc	(revision )
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * PHP X Userscript CRUD.
+ *  PHP X Userscript CRUD.
  */
 
 /**
@@ -130,18 +130,23 @@
 
   if ($userscript) {
     foreach ($userscript as $s) {
-      $rows[] = array(
-        '<span id="script-' . $s['id'] . '-name">' . htmlspecialchars($s['name']) . '</span>',
-        '<span id="script-' . $s['id'] . '">' . htmlspecialchars($s['script']) . '</span>',
-        $s['created'] ? format_date($s['created'], 'custom', 'd.m.Y H:i:s') : '',
-        $s['changed'] ? format_date($s['changed'], 'custom', 'd.m.Y H:i:s') : '',
-        '<a class="script-load" rel="script-' . $s['id'] . '" href="#">load</a>',
-        l(t('Delete'), 'devel/php/delete-script/' . $s['id']),
+      // Reset row variable.
+      $row = array();
+      $row[] = '<span id="script-' . $s['id'] . '-name">' . check_plain($s['name']) . '</span>';
+      $row[] = '<span id="script-' . $s['id'] . '">' . check_plain($s['script']) . '</span>';
+      $row[] = format_date($s['created'], 'custom', PHPX_TOOLS_DATE_FORMAT);
+      $row[] = format_date($s['changed'], 'custom', PHPX_TOOLS_DATE_FORMAT);
+      $row[] = l(
+        t('Load'),
+        '#',
+        array('absolute' => TRUE, 'attributes' => array('rel' => 'script-' . $s['id']))
       );
+      $row[] = l(t('Delete'), 'devel/php/delete-script/' . $s['id']);
+      $rows[] = $row;
     }
   }
   else {
-    return ' :( ' . t("There are currently no saved scripts. Aren't you curios how this table would look like populated with some data? Start saving your script!");
+    return " :( " . t("There are currently no saved scripts. Aren't you curios how this table would look like populated with some data? Start saving your script!");
   }
 
   return theme('table', array(

--- phpx_tools/phpx_tools.module	(date 1451474798000)
+++ phpx_tools/phpx_tools.module	(revision )
@@ -6,6 +6,7 @@
  */
 
 define('PHPX_TOOLS_PATH', drupal_get_path('module', 'phpx_tools'));
+define('PHPX_TOOLS_DATE_FORMAT', 'd.m.Y H:i:s');
 
 module_load_include('inc', 'phpx_tools', 'phpx_tools.history');
 module_load_include('inc', 'phpx_tools', 'phpx_tools.userscript');
@@ -67,6 +68,7 @@
  * Implements hook_form_FORM_ID_alter().
  */
 function phpx_tools_form_devel_execute_form_alter(&$form, &$form_state, $form_id) {
+  $form['#attributes']['class'][] = 'phpx-tools';
   // Add the history fieldset.
   $form['execute']['history_fieldset'] = array(
     '#type'        => 'fieldset',
@@ -269,7 +271,14 @@
     '#type' => 'value',
     '#value' => $script_id,
   );
-  return confirm_form($form, t('Are you sure you want to delete the script %name ?', array('%name' => $script[0]['name'])), 'devel/php', t('This action cannot be undone.'), t('Delete'));
+
+  $question = t(
+    'Are you sure you want to delete the script %name ?',
+    array('%name' => $script[0]['name'])
+  );
+  $alert = t('This action cannot be undone.');
+
+  return confirm_form($form, $question , 'devel/php', $alert , t('Delete'));
 }
 
 /**

--- phpx_tools/phpx_tools.history.inc	(date 1451474798000)
+++ phpx_tools/phpx_tools.history.inc	(revision )
@@ -109,9 +109,8 @@
  *   Table HTML
  */
 function phpx_tools_build_history_table() {
-
   // Define the table head.
-  $head = array(t('PHP'), t('Executed'), t('Load'));
+  $head = array(t('Script'), t('Executed'), t('Load'));
   $rows = array();
 
   // Get all history entries.
@@ -119,12 +118,20 @@
 
   // Build the table rows.
   if ($history) {
-    foreach ($history as $h) {
-      $rows[] = array(
-        '<span id="script-' . $h['id'] . '">' . htmlspecialchars($h['script']) . '</span>',
-        $h['executed'] ? format_date($h['executed'], 'custom', 'd.m.Y H:i:s') : '',
-        '<a class="script-load" rel="script-' . $h['id'] . '" href="#">load</a>',
+    foreach ($history as $item) {
+      $row = array();
+      // Script text.
+      $row[] = '<span id="script-' . $item['id'] . '">' . check_plain($item['script']) . '</span>';
+      // Script date.
+      $row[] = $item['executed'] ? format_date($item['executed'], 'custom', PHPX_TOOLS_DATE_FORMAT) : '';
+      // Script load link.
+      $row[] = l(
+        t('load'),
+        '#',
+        array('absolute' => TRUE, 'attributes' => array('rel' => 'script-' . $item['id']))
       );
+
+      $rows[] = $row;
     }
   }
   else {
