Greasy Fork 替换原图

脚本详情页预览图替换为原图, 方便拖拽保存。github:https://github.com/Ahaochan/Tampermonkey,欢迎star和fork。

当前为 2017-11-12 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Greasy Fork 替换原图
  3. // @name:ja Greasy Fork replace original image
  4. // @name:en Greasy Fork replace original image
  5. // @namespace https://github.com/Ahaochan/Tampermonkey
  6. // @version 0.0.1
  7. // @description 脚本详情页预览图替换为原图, 方便拖拽保存。github:https://github.com/Ahaochan/Tampermonkey,欢迎star和fork。
  8. // @description:ja Replacement script details page preview is the original image, easy to drag and save. Github:https://github.com/Ahaochan/Tampermonkey. Star and fork is welcome.
  9. // @description:en Replacement script details page preview is the original image, easy to drag and save. Github:https://github.com/Ahaochan/Tampermonkey. Star and fork is welcome.
  10. // @author Ahaochan
  11. // @supportURL https://github.com/Ahaochan/Tampermonkey
  12. // @match http://greasyfork.org*
  13. // @match https://greasyfork.org*
  14. // @match http://greasyfork.org/*
  15. // @match https://greasyfork.org/*
  16. // @require https://code.jquery.com/jquery-2.2.4.min.js
  17. // ==/UserScript==
  18.  
  19. (function ($) {
  20. 'use strict';
  21.  
  22. $('.script-screenshots a img').each(function () {
  23. var $this = $(this);
  24. var width = this.clientWidth, height = this.clientHeight;
  25. var url = $this.attr('src').replace('thumb', 'original');
  26. $this.attr('src', url)
  27. .attr('width', width)
  28. .attr('height', height);
  29. });
  30. })(jQuery);