pixivの作品一覧をトリミングせずに表示

pixivのプロフィール画面(ユーザーのイラストやマンガが一覧表示される画面)と、作品画面の下に表示される作者の作品一覧内の作品が、正方形にトリミングされて表示されるのを防止します。

< 脚本 pixivの作品一覧をトリミングせずに表示 的反馈

提问 / 留言

§
发布于:2019-03-01
编辑于:2019-03-02

suggestion

you can use

let elementClassName=`[width="184"] [style^='background-image: url("https://i.pximg.net/c/']`;

instead of let elementClassName="*constantly changing class*";

i also made some more changes:

// @grant        GM_addStyle
// ==/UserScript==
'use strict';

GM_addStyle(`[width="184"] [style^='background-image: url("https://i.pximg.net/c/'] { background-size: contain !important; }`);

setInterval(function(){
    let array = document.querySelectorAll(`[width="184"] [style^='background-image: url("https://i.pximg.net/c/']:not(.changed)`);
    for (let i = array.length; i--;) {
        array[i].style.backgroundImage = array[i].style.backgroundImage.replace(/\d{3}x\d{3}_.+?\//, '240x240/').replace('square1200', 'master1200');
        array[i].classList.add('changed');
    }
}, 500);

Patriot作者
§
发布于:2019-03-05

Your suggestion looks very nice.👍 I'll test your script for something problems. If there is no problems, I'll merge your script into this script and will write your name on Credits with special thank. Thank you!

Patriot作者
§
发布于:2019-03-07

Your suggestion has merged. You can see it in the script page.

发布留言

登录(不可用)以发布留言。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址