Greasy Fork

Greasy Fork is available in English.

Flickr WideScreen BigONE - Classic Group - HI-RES Pics v.2

Higher resolution shots (by NotYou and DuckDuckGo IA)

当前为 2024-10-02 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Flickr WideScreen BigONE - Classic Group - HI-RES Pics v.2
// @description  Higher resolution shots (by NotYou and DuckDuckGo IA)
// @version      2.0
// @author       decembre
// @namespace    http://greasyfork.icu/fr/users/8-decembre
// @icon         https://external-content.duckduckgo.com/ip3/blog.flickr.net.ico

// @match     https://www.flickr.com/groups_pool.gne*
// @match      https://www.flickr.com/groups/*

// @include      https://www.flickr.com/groups_pool.gne*
// @include      https://www.flickr.com/groups/*

// @require https://code.jquery.com/jquery-3.6.0.min.js
// @grant GM_addStyle
// ==/UserScript==

(function() {
  var $ = window.jQuery;

  // FLICKR 1 - POOL SMALL
  // #pool-photos.sm .thumb img:not(.video-play-icon)[src$="_t.jpg"]
  (function() {
    document.querySelectorAll('#pool-photos.sm .thumb img:not(.video-play-icon)[src$="_t.jpg"]').forEach(elem => {
      if(elem.tagName.toLowerCase() === 'source') {
        const newSrcset = elem.srcset.replace(/\_t\.jpg$/, getNewSource);

        elem.srcset = newSrcset;
      } else {
        const newSource = elem.src.replace(/\_t\.jpg$/, getNewSource);

        elem.src = newSource;
      }

      function getNewSource(m) {
        const indexOfDot = m.indexOf('.')
        const fileExtenstion = m.slice(indexOfDot)
        const fileName = m.slice(0, indexOfDot)

        return fileName.replace('t', 'w') + fileExtenstion
      }

    });

  })();

  // FLICKR 2 - JUSTIFIED VIEW (for large blurry image)
  (function() {
    document.querySelectorAll('.ju.photo-display-container .pool-photo.photo-display-item [src$="_t.jpg"]').forEach(elem => {
      const newSource = elem.src.replace(/\_t\.jpg$/, '_b.jpg');
      elem.src = newSource;
    });
  })();

  // Ajout de CSS
  $ ('head').append(`
    <style type='text/css'>
    /* SMALL VIEW */
       /*#pool-photos.sm .thumb img:not(.video-play-icon)[src$="_w.jpg"]{
        border: 1px dashed aqua  !important;
      }*/
      /* JUSTIFIED VIEW - BLURRY IMAG */
      /*.ju.photo-display-container .pool-photo.photo-display-item [src$="_b.jpg"] {
        border: 1px dotted aqua  !important;
      }*/
    </style>
  `);
})();