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.

댓글 남기기

댓글을 남기려면 로그인하세요.