Skip to content

Instantly share code, notes, and snippets.

@Dizolivemint
Created October 14, 2016 01:31
Show Gist options
  • Select an option

  • Save Dizolivemint/263c07b701663d108a15c3fb475d43a1 to your computer and use it in GitHub Desktop.

Select an option

Save Dizolivemint/263c07b701663d108a15c3fb475d43a1 to your computer and use it in GitHub Desktop.

Revisions

  1. Dizolivemint created this gist Oct 14, 2016.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // ==UserScript==
    // @name Moodle Broken File Check
    // @namespace elearning.pacificcollege.edu
    // @description Check for Broken Files
    // @version 1
    // @include http://elearning.pacificcollege.edu/course/*
    // @grant none
    // ==/UserScript==

    var links = document.links;

    document.getElementById('course-header').innerHTML += "<p>The Following Links are Broken</p>"
    for(var i=0; i<links.length; i++) {
    if (links[i].href.indexOf('brokenfile.php') > -1) {
    document.getElementById('course-header').innerHTML += "<p>" + links[i].innerHTML + "</p>";
    }
    }