Greasy Fork is available in English.

Google Album Archive Direct Photo Link

Get Google Photo Direct Link

  1. // ==UserScript==
  2. // @name Google Album Archive Direct Photo Link
  3. // @namespace http://qqboxy.blogspot.com
  4. // @version 0.4
  5. // @description Get Google Photo Direct Link
  6. // @author QQBoxy
  7. // @match *.googleusercontent.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var linkSplit = window.location.href.split("=");
  14. var param = linkSplit[0].match(/(w\d+\-h\d+)((?:\-[rw|p|no]+)+)/);
  15. if(linkSplit[1] !== "s0-tmp.jpg" && linkSplit.length>1) {
  16. linkSplit[0] = linkSplit[0] + "=s0-tmp.jpg";
  17. window.location.href = linkSplit[0];
  18. } else if(param) {
  19. linkSplit[0] = linkSplit[0].replace(param[0],"s0");
  20. window.location.href = linkSplit[0];
  21. }
  22. })();