Google Plus Image Download Button

try to take over the world!

  1. // ==UserScript==
  2. // @name Google Plus Image Download Button
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://plus.google.com/
  8. // @grant none
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var css = `
  15. ._post-image-download {
  16. margin: 20px;
  17. text-align: right;
  18. position: relative;
  19. overflow: hidden;
  20. }
  21. ._post-image-download a {
  22. color: #000000;
  23. padding: 0;
  24. line-height: 36px;
  25. width: 36px;
  26. height: 36px;
  27. display: block;
  28. text-align: center;
  29. float: right;
  30. font-size: 24px;
  31. border-radius: 50%;
  32. background-color: #eee;
  33. }
  34. `;
  35. $('head').append('<style type="text/css">' + css + '</style>');
  36.  
  37. function addDownloadButtons() {
  38. //$('._post-image-download').remove();
  39. $('.SlwI7e').each(function() {
  40. if ( $('._post-image-download', this).length > 0 ) return;
  41. var img = $('img', this);
  42. if (img.length == 1) {
  43. var url = img[0].src.replace(/\/w[0-9]+-h[0-9]+[^\/]*\//, '/w9999-h9999/');
  44. $(this).append('<div class="_post-image-download"><a target="_blank" href="'+url+'">&#128426;</a></div>');
  45. } else {
  46. $(this).append('<div class="_post-image-download">error</div>');
  47. }
  48. //console.log(this);
  49. });
  50. }
  51.  
  52. addDownloadButtons();
  53. setInterval( addDownloadButtons, 1000 * 4 );
  54.  
  55.  
  56. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址