Greasy Fork is available in English.

微博图片原图地址批量复制

点击下方的“复制”链接后,就可粘贴到贴吧或者迅雷批量下载

Od 13.08.2015.. Pogledajte najnovija verzija.

  1. // ==UserScript==
  2. // @name 微博图片原图地址批量复制
  3. // @description 点击下方的“复制”链接后,就可粘贴到贴吧或者迅雷批量下载
  4. // @include http://www.weibo.com/*
  5. // @version 0.1
  6. // @author yechenyin
  7. // @namespace https://greasyfork.org/users/3586-yechenyin
  8. // @require https://code.jquery.com/jquery-1.11.2.min.js
  9. // @grant GM_setClipboard
  10. // ==/UserScript==
  11.  
  12. $(function() {
  13.  
  14. if (!location.href.indexOf("http://www.weibo.com/")) {
  15. for (var i=0; i<$('.WB_row_line').length; i++) {
  16. $('.WB_row_line').eq(i).html('<li class="copy_images"><a class="S_txt2"><span class="S_line1 line">复制</span></a></li>'+$('.WB_row_line').eq(i).html());
  17. }
  18. $('.WB_row_line li').css({width:"20%"});
  19.  
  20. $('.copy_images').click(function () {
  21. urls = '';
  22. var images = $(this).parent().parent().parent().parent().find('.WB_media_a img');
  23. //images;
  24. for (var i=0; i<images.length; i++) {
  25. urls += images[i].src + '\n';
  26. }
  27. urls = urls.replace(/\/square\//g, '/large/');
  28. console.log(urls);
  29. GM_setClipboard(urls);
  30. });
  31. }
  32.  
  33. });