aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..b7bc92b
--- /dev/null
+++ b/main.js
@@ -0,0 +1,16 @@
+(function() {
+ var jira_person_header_class_name = '.ghx-heading';
+
+ // Removes spaces from a string
+ function slugify (str) {
+ return str.replace(/ /g, '');
+ }
+
+ Array.prototype.forEach.call(
+ document.querySelectorAll(jira_person_header_class_name),
+ function(element) {
+ element.setAttribute('id', slugify(element.firstChild.textContent));
+ console.log(element);
+ }
+ );
+})();