500px.com

download picture

当前为 2019-10-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 500px.com
  3. // @namespace http://zszen.github.io/
  4. // @version 1.0
  5. // @description download picture
  6. // @author Zszen
  7. // @match https://web.500px.com/photo/*
  8. // @require https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var sid = setInterval(initMe, 500);
  15. function initMe() {
  16. if($("button#dw123").length>0){
  17. clearInterval(sid);
  18. return;
  19. }
  20. $("div#copyrightTooltipContainer").after("<button id='dw123'>DOWNLOAD</button>");
  21. //console.log(bt);
  22. $("button#dw123").on('click',function(){
  23. var img = $("div#copyrightTooltipContainer").find("img")[0].src;
  24. window.open(img,"_blank");
  25. })
  26. }
  27. // Your code here...
  28. })();