Last active
December 22, 2015 15:19
-
-
Save mohemohe/6491576 to your computer and use it in GitHub Desktop.
自分用UserScript 連続<br>の削除
全角英数を半角に
This file contains 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 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