const $ = require('jquery');
const logger = require('logger');

function updateTitles() {
  logger.log('commentDecorator.js: Updating tooltips');

  $('[data-fate-weapon-registered=true]').each(function(index,element) {
    const name = $(this).attr('data-fate-weapon-name');
    const type = $(this).attr('data-fate-weapon-type');
    const comments = $(this).attr('data-fate-comment');
    $(this).attr('title',name + ' // ' + type + '\n' + comments);
  });

  $('[data-fate-shader-registered=true]').each(function(index,element) {
    const name = $(this).attr('data-fate-shader-name');
    const comments = $(this).attr('data-fate-comment');
    $(this).attr('title',name + '\n' + comments);
  });

}

fateBus.subscribe(module, 'fate.refresh', updateTitles);

@@ -696,16 +696,256 @@
 %0A  %7D);%0A%0A
+  $('%5Bdata-fate-armor-registered=true%5D').each(function(index,element) %7B%0A    const name = $(this).attr('data-fate-armor-name');%0A    const comments = $(this).attr('data-fate-comment');%0A    $(this).attr('title',name + '%5Cn' + comments);%0A  %7D);%0A%0A
 %7D%0A%0AfateB

Add comments to armor