Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Last active December 22, 2015 15:19
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 mohemohe/6491576 to your computer and use it in GitHub Desktop.
Save mohemohe/6491576 to your computer and use it in GitHub Desktop.
自分用UserScript 連続<br>の削除 全角英数を半角に
// ==UserScript==
// @name fucker
// @namespace net.ghippos.fucker
// @description yep, im page fucker.
// @include *
// @version 1
// ==/UserScript==
(function() {
//<br>
var css = "br{display:block!important;line-height:0px!important;}";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
//Zenkaku
document.body.innerHTML = document.body.innerHTML.replace(/[A-Za-z0-9]/g, function(str) {
return String.fromCharCode(str.charCodeAt(0) - 0xFEE0);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment