Skip to content

Instantly share code, notes, and snippets.

@cofyc
Last active August 29, 2015 14:12
Show Gist options
  • Save cofyc/60771470005b62a3096c to your computer and use it in GitHub Desktop.
Save cofyc/60771470005b62a3096c to your computer and use it in GitHub Desktop.
rfc fix userscript
// ==UserScript==
// @name rfc fix
// @namespace http://yechengfu.com
// @version 0.1
// @description Fix h1 headers on http://tools.ietf.org/html/rfc* pages.
// @author Yecheng Fu
// @match http://tools.ietf.org/html/rfc*
// @require http://a.tbcdn.cn/libs/jquery/1.7.1/jquery.js
// @grant none
// ==/UserScript==
$(document).ready(function() {
// fix h1 headers
$('span.h1').each(function (index, element) {
var text = $(this).text()
if (text.match(/^[A-Z]\s/)) {
$(this).replaceWith($(this).text())
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment