To Do list title - Canvas Instructure

Shows the full TO Do task title when you hover over it on the instructure.com dashboard of your course.

  1. // ==UserScript==
  2. // @name To Do list title - Canvas Instructure
  3. // @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
  4. // @version 5
  5. // @description Shows the full TO Do task title when you hover over it on the instructure.com dashboard of your course.
  6. // @author hacker09
  7. // @match https://*.instructure.com/*
  8. // @icon https://du11hjcvx0uqb.cloudfront.net/br/dist/images/favicon-e10d657a73.ico
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. setTimeout(async function() {
  14. 'use strict';
  15. document.querySelectorAll("div.ToDoSidebarItem__Title").forEach(el => el.title = el.querySelector('div > a > span').innerText); //Fully show each title on hover
  16.  
  17. new MutationObserver(async function() { //Se uma quantidade diferente for selecionada
  18. document.querySelectorAll("div.ToDoSidebarItem__Title").forEach(el => el.title = el.querySelector('div > a > span').innerText); //Fully show each title on hover
  19. }).observe(document.querySelector("#planner-todosidebar-item-list"), { //Defines the element and the characteristics to be observed
  20. attributes: false,
  21. attributeOldValue: false,
  22. characterData: false,
  23. characterDataOldValue: false,
  24. childList: true,
  25. subtree: true
  26. }); //Finishes the definitions to be observed
  27. }, 3000);