Skip to content

Instantly share code, notes, and snippets.

javascript:(function(){document.location.href='https://chart.googleapis.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl='+encodeURIComponent(document.location.href);})()
// 根据当前页面生成 QR code 的 bookmarklet
// 用到了 Google Chart API: https://developers.google.com/chart/infographics/docs/qr_codes?csw=1
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.7",function($,L){var playlists = [];$("body > .Menu").remove();$(".TrackList .Track:first").find('.ActionMenu.pill').trigger('click');$("body > .Menu:first").find(".scroller.vertical").find(".embedded").find("li[title=" + name + "]").trigger('click');$(".menu_click_shield").trigger('click');$("body > .Menu .scroller.vertical .embedded li").each(function(){ playlists.push($(this).attr('title').trim());});$("body > .Menu").remove();var add_playlist_index = [];$(".horizontal .ActionMenu.toolbar").append('<button class="button add_to_playlist" style="display: none;">Add To Playlist</a>');$("button.
@disinfeqt
disinfeqt / gist:1151270
Created August 17, 2011 10:20 — forked from tlxue/gist:1151105
Rabbit Shit
(function(){
var links = document.getElementsByTagName("a"),
i;
for (i=0;i<links.length;i++){
links[i].addEventListener('click',function(e){
e.preventDefault(); // this is better if you want to disable links
// return false
},false);
}
})();