Greasy Fork 替换原图

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

当前为 2019-09-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Greasy Fork replace original image
  3. // @name:zh-CN Greasy Fork 替换原图
  4. // @name:zh-TW Greasy Fork 替換原圖
  5. // @namespace https://github.com/Ahaochan/Tampermonkey
  6. // @version 0.0.1
  7. // @description 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.
  8. // @description:zh-CN 脚本详情页预览图替换为原图, 方便拖拽保存。github:https://github.com/Ahaochan/Tampermonkey,欢迎star和fork。
  9. // @description:zh-TW 腳本詳情頁預覽圖替換為原圖, 方便拖拽保存。github:https://github.com/Ahaochan/Tampermonkey,歡迎star和fork。
  10. // @author Ahaochan
  11. // @supportURL https://github.com/Ahaochan/Tampermonkey
  12. // @include http*://greasyfork.org*
  13. // @include http*://www.greasyfork.org/*
  14. // @require https://code.jquery.com/jquery-2.2.4.min.js
  15. // ==/UserScript==
  16.  
  17. (function ($) {
  18. 'use strict';
  19.  
  20. $('.script-screenshots a img').each(function () {
  21. var $this = $(this);
  22. var width = this.clientWidth, height = this.clientHeight;
  23. var url = $this.attr('src').replace('thumb', 'original');
  24. $this.attr('src', url)
  25. .attr('width', width)
  26. .attr('height', height);
  27. });
  28. })(jQuery);