500px.com

download picture

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