Skip to content

docblock "Mantis Graph plugin" und get rid of jquery #3

@grummbeer

Description

@grummbeer

Thanks for your plugin, works fine, but one little thing … :-)

/**
 * Mantis Graph plugin
 */

Wouldn't it be nice to get rid of jquery?

document.addEventListener('DOMContentLoaded', function(event) {[
    '#buglist .fa-status-box' /*listing*/,
    '#view-issue-page .fa-status-box' /*view header/relations*/
  ].forEach((selector) => {
    document.querySelectorAll(selector).forEach((status) => {
      status.closest('td').classList.add([...status.classList].find((n) => /^status-/.test(n))?.replace('-fg','-bg'));
      status.remove()
    })
  })
});

I know jquery is there anyway and so why not use it. But it's about jquery itself and vanilla looks nicer … and the bug relations would also colored -:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions