PageSourceSearch

https://www.kent.edu/modules/custom/kent_state_utilities/js/node_editing_form.js?tlsd5q&tlsd5q

js kent.edu collected 2026-09-24 08:28:10 UTC 1,672 bytes, 31 lines download raw bytes

1// The following script modifies the header title in the node edit form for easier styling and visual hierarchy.
2    (function ($, Drupal) {
3        Drupal.behaviors.kentStateEditTitleFix = {
4          attach: function () {
5            once('kent-state-title-fix', 'h1.js-quickedit-page-title, h1.page-title').forEach(function (el) {
6              const $title = $(el);
7              const content = $title.html();
8      
9              // Regex to capture "Edit Content Type Name" and the "Node Title"
10              // It looks for "<em>Edit Something Here</em> The Node Title"
11              const match = content.match(/<em>(.*?)<\/em>(.*)/);
12      
13              if (match && match[1] && match[2]) {
14                const emContent = match[1].trim(); // Content within <em> tags, e.g., "Edit Administrative Group Par"
15                const nodeTitle = match[2].trim(); // Content after <em> tags, e.g., "The Actual Page Title"
16      
17                // Split the <em> content into "Edit" and the rest
18                const parts = emContent.split(/ (.*)/s); // Splits at the first space, s flag for dotall
19                const editText = parts[0]; // Should be "Edit"
20                const contentType = parts[1] || ''; // The rest of the string, e.g., "Administrative Group Par"
21      
22                $title.html(
23                  '<span class="edit-action">' + editText + '</span> ' +
24                  '<span class="content-type">' + contentType + '</span><br>' +
25                  '<span class="node-title">"' + nodeTitle + '"</span>' // Added double quotes here
26                );
27              }
28            });
29          }
30        };
31      })(jQuery, Drupal);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.