Last active
August 29, 2015 14:11
-
-
Save laiso/11da2c32ae9876fb75b4 to your computer and use it in GitHub Desktop.
英文をメソッド名にするやつ(スネークケース)
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
var select = window.getSelection().toString(); | |
var text = (select.length>0)? select: document.querySelector("span.gt-card-ttl-txt").innerText; | |
alert(text.textContent.toLowerCase().replace(" ","_","g")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment