MakeTitlesFit

Makes it so the title isn't truncated in the Title column.

  1. // ==UserScript==
  2. // @name MakeTitlesFit
  3. // @namespace https://greasyfork.org/en/users/6503-turk05022014
  4. // @version 1.0.20180114
  5. // @description Makes it so the title isn't truncated in the Title column.
  6. // In addition to making titles fit, it will also help make requester names fit.
  7. // Really long requester names won't look correct.
  8. // This may break scripts.
  9. // Use at your own risk.
  10. // I won't be held liable; you've been warned.
  11. // Has a 1500 millisecond delay to help mitigate interference with scripts.
  12. // @match https://worker.mturk.com/?filters*
  13. // @match https://worker.mturk.com/projects?*
  14. // @match https://worker.mturk.com/projects
  15. // @match https://worker.mturk.com/projects/
  16. // @match https://worker.mturk.com/projects/?filters*
  17. // @match https://worker.mturk.com/projects/?page_size=*
  18. // @match https://worker.mturk.com/requesters/*
  19. // @match https://worker.mturk.com/?*
  20. // @match https://worker.mturk.com/
  21. // @require http://code.jquery.com/jquery-latest.min.js
  22. // @grant none
  23. // ==/UserScript==
  24.  
  25. this.$ = this.jQuery = jQuery.noConflict(true);
  26. $().ready(function() {
  27. window.setTimeout(function () {
  28. $("span.requester-column.text-truncate").each(function(index) {
  29. $(this).find("a.hidden-sm-down").wrap('<div style="float:left;height:25px;"></div>');
  30. });
  31. $('span.project-name-column.text-truncate, span.requester-column.text-truncate').each(function(index) {
  32. var el = $(this).get(0);
  33. var link = $(this).find("a");
  34. $(this).css('white-space', 'normal');
  35. if ($(this).parent().height() < el.clientHeight) {
  36. $(this).parent().height(el.clientHeight);
  37. }
  38. });
  39. }, 1500);
  40. //Will wait 1500 milliseconds before activating to help prevent script conflicts.
  41. });