Skip to content

Instantly share code, notes, and snippets.

@Absolucy
Last active July 8, 2020 19:21
Show Gist options
  • Save Absolucy/710e209b91dcba8ee887c27c0818bc2e to your computer and use it in GitHub Desktop.
Save Absolucy/710e209b91dcba8ee887c27c0818bc2e to your computer and use it in GitHub Desktop.
A userscript to fix lib.rs's titles to respect snake_case.
// ==UserScript==
// @name lib_rs_fixer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Fixes lib.rs disrespecting snake_case crate names.
// @author aspen <[email protected]>
// @match https://lib.rs/crates/*
// @grant none
// @require https://code.jquery.com/jquery-3.x-git.slim.min.js
// ==/UserScript==
(function() {
'use strict';
var pack_name = $("#package > div:nth-child(1) > h2:nth-child(3) > span:nth-child(2)").text();
document.title = pack_name + ' - lib.rs';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment