Canvas module page media width and height

Media videos under the modules for Georgia Tech canvas instructure show up in a mobile size even on the desktop. This script changes that.

  1. // ==UserScript==
  2. // @name Canvas module page media width and height
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Media videos under the modules for Georgia Tech canvas instructure show up in a mobile size even on the desktop. This script changes that.
  6. // @author You
  7. // @match https://gatech.instructure.com/courses/*/pages/*modules*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=instructure.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. if (document.getElementsByTagName("iframe").length > 1) {
  16. document.getElementsByTagName("iframe")[1].width = "100%";
  17. document.getElementsByTagName("iframe")[2].width = "100%";
  18. }
  19. if (document.getElementsByTagName("iframe").length > 2) {
  20. document.getElementsByTagName("iframe")[1].height = "1000px";
  21. document.getElementsByTagName("iframe")[2].height = "1000px";
  22. }
  23. })();