Introducing User Scripts
posted on Dec. 19, 2015, 11:41 p.m. 7With the recent addition of Wikipedia-like user scripts, now you can change how the DMOJ looks and works! A user script is a small bit of customizable Javascript that is embedded into every page, and allows you to modify everything regarding the site's look. User scripts may be defined in the edit profile page.
For example, if you wanted to make the navigation bar non-sticky, you could use a simple script.
// Wait for page load
$(function() {
// Select the navigation bar
$("#navigation").css({
// Update the CSS
position: "absolute"
});
});
Or perhaps you'd prefer a more festive look to the site.
$(function() {
$("#page-container").css({background: "#FDDDDD"});
$("body").css({background: "#99FFA8"});
});
Or even display an encouraging message on every page load.
$(function() {
alert("You can do it!");
});