Created
October 14, 2016 01:31
-
-
Save Dizolivemint/263c07b701663d108a15c3fb475d43a1 to your computer and use it in GitHub Desktop.
A Moodle Simple Broken Link Checker for Greasemonkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment