Created
January 28, 2013 05:18
-
-
Save ide-an/4653258 to your computer and use it in GitHub Desktop.
YouTubeの再生画面からBGMShareHouseにキューを投げるブックマークレット(非同期版)
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
// YouTubeの再生画面からBGMShareHouseにキューを投げるブックマークレット(非同期版) | |
// javascript:(function(h,d,e){e=d.createElement("script");e.src=h+"code.jquery.com/jquery-1.9.0.min.js";e.onload=function(){setTimeout(function(){jQuery.post(h+"bgm.tokor.org/query.php",{qmode:"new",qvalue:/v=(.{11})/.exec(location.href)[1]})},500);};d.body.appendChild(e)})("http://",document) | |
// コード削る前 | |
(function(){ | |
var url="http://code.jquery.com/jquery-latest.min.js"; | |
var el=document.createElement("script"); | |
el.src=url; | |
el.onload = function(){ | |
setTimeout(function(){ | |
console.log($,jQuery); | |
jQuery.post("http://bgm.tokor.org/query.php",{qmode:"new",qvalue:/v=(.{11})/.exec(location.href)[1]}); | |
},500); | |
} | |
document.body.appendChild(el); | |
})() | |
// 削った後 | |
(function(h,d,e){ | |
e=d.createElement("script"); | |
e.src=h+"code.jquery.com/jquery-1.9.0.min.js"; | |
e.onload = function(){ | |
setTimeout(function(){ | |
jQuery.post(h+"bgm.tokor.org/query.php",{qmode:"new",qvalue:/v=(.{11})/.exec(location.href)[1]}) | |
},500); | |
}; | |
d.body.appendChild(e) | |
})("http://",document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you ide_an!!