Skip to content

Instantly share code, notes, and snippets.

@williamshen-nz
Created March 2, 2019 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save williamshen-nz/6c74937e8f46e5abae23125d8e59f5d0 to your computer and use it in GitHub Desktop.
Save williamshen-nz/6c74937e8f46e5abae23125d8e59f5d0 to your computer and use it in GitHub Desktop.
Clean Wattle
// ==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