Created
March 2, 2019 06:46
-
-
Save williamshen-nz/6c74937e8f46e5abae23125d8e59f5d0 to your computer and use it in GitHub Desktop.
Clean Wattle
This file contains 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 Clean up Wattle | |
// @namespace https://shen.nz | |
// @version 0.1 | |
// @description Remove the huge banner image, search bar and course image previews from Wattle | |
// @author William Shen | |
// @match https://wattlecourses.anu.edu.au/my/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Remove the stupid heading thing and search courses bar, note this might be different for different users | |
var ids_to_remove = ["inst202504", "inst202505"]; | |
ids_to_remove.forEach(function(current_id) { | |
var start_block = document.getElementById(current_id); | |
start_block.parentNode.removeChild(start_block); | |
console.log("Removed " + current_id); | |
}); | |
// Remove the stupid image for each course | |
var course_images = document.getElementsByClassName("coursepattern"); | |
course_images = Array.prototype.slice.call(course_images); | |
course_images.forEach(function(image) { | |
image.parentNode.removeChild(image); | |
console.log("Removed " + image); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment