Skip to content

Instantly share code, notes, and snippets.

@ygkn
Last active October 30, 2016 14:55
Show Gist options
  • Save ygkn/156fd03b79771db2bcbc47c6db4a918a to your computer and use it in GitHub Desktop.
Save ygkn/156fd03b79771db2bcbc47c6db4a918a to your computer and use it in GitHub Desktop.
J-Lyricの歌詞をコピるブックマークレット ref: http://qiita.com/ygkn/items/57ad273ee04fce7a26aa
javascript:(function(r){r.selectNode(document.getElementById("lyricBlock"));getSelection().addRange(r);document.execCommand("copy");getSelection().removeAllRanges()})(document.createRange())
(function(r) {
r.selectNode(document.getElementById("lyricBlock"));
getSelection().addRange(r);
document.execCommand("copy");
getSelection().removeAllRanges()
})(document.createRange())
(function(r){
// 略
})(document.createRange())
(function(){
var r = document.createRange()
// 略
})()
(function() {
var range = document.createRange();
var lyricBlock = document.getElementById("lyricBlock");
range.selectNode(lyricBlock);
getSelection().addRange(range);
document.execCommand("copy");
getSelection().removeAllRanges()
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment