Guest User

Untitled

a guest
Feb 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function addRocmSmi() {
  2. let parent;
  3. let inputGroup;
  4. let addRocm = '<div><code class="code-exec rocm-smi">rocm-smi</code></div>';
  5.  
  6. $('.hidden').length > 0 ? $('.hidden').addClass('linux-shell-execute') : false;
  7. $('.linux-shell-execute').append(addRocm);
  8.  
  9. $('.rocm-smi').on('click', function() {
  10. parent = $(this).closest('.linux-shell-execute');
  11. inputGroup = parent.find('.input-group');
  12. inputGroup.find('.form-control').val('rocm-smi');
  13. inputGroup.find('button').click();
  14. });
  15. }
  16. addRocmSmi();
Add Comment
Please, Sign In to add comment