zentao fix image type

因某些图片上传格式错误,故直接修改文件格式(需要提前安装TIFF viewer)

  1. // ==UserScript==
  2. // @name zentao fix image type
  3. // @namespace https://www.zentao.net/
  4. // @version 1.0
  5. // @description 因某些图片上传格式错误,故直接修改文件格式(需要提前安装TIFF viewer)
  6. // @author Lennon
  7. // @match http://192.168.25.25:10027/zentao/*
  8. // @run-at document-end
  9. // @icon https://www.zentao.net/data/upload/201606/f_4140edf00c28c7f976e1d1aa2796cabc.ico
  10. // ==/UserScript==
  11. (function () {
  12. 'use strict';
  13.  
  14. $('.main-col').find('img').each(function(){
  15. $(this).attr('src', $(this).attr('src').replace('.png', '.tif'))
  16. })
  17. })();