Last active
August 29, 2015 14:12
-
-
Save cofyc/60771470005b62a3096c to your computer and use it in GitHub Desktop.
rfc fix userscript
This file contains hidden or 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 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