Skip to content

Instantly share code, notes, and snippets.

@tlxue
Created July 22, 2011 08:26
Show Gist options
  • Save tlxue/1099088 to your computer and use it in GitHub Desktop.
Save tlxue/1099088 to your computer and use it in GitHub Desktop.
ZH 答案链接生成
javascript:(function(){var url=window.location.href.replace(window.location.hash,'');if(url.indexOf('zhihu')==-1){return;}var obj=window['xxxxxxxx']||DZMT;if(!obj){return;}var q=obj[2][1];var ans=q[11];var list=[];for(var k=0;k<ans.length;k++){var aid=ans[k][0];var userName=ans[k][2][0];list.push(userName+': '+url+'#'+aid);}alert(list.join('\n'));})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment