[TS] Pixiv++ V3 alpha

Development has halted until I have more time. Pixiv uses async page loading, which broke some aspects of this script. Ultimate Pixiv Script: Direct Links, Auto-Paging, Preview, IQDB/Danbooru, Filter/Sort using Bookmark,views,rating,total score. | Safe Search | plus more. Works best with "Pixiv++ Manga Viewer" and "Generic Image Viewer". 自動ページング|ポケベル|ロード次ページ|フィルター|並べ替え|注文|ダイレクトリンク

< Feedback on [TS] Pixiv++ V3 alpha

Question/comment

§
Posted: 27-12-2016
Edited: 27-12-2016

Thumbnails broken from page2 downwards

Hi there, just wanted to report that thumbnails don't show up now for some reason.
Here's a screencap to illustrate

http://imgur.com/JWm3yI5

Thanks for the great script and Happy New Year!

Edit - Sorry just to clarify, this is with Auto Pager on

§
Posted: 27-12-2016
Edited: 25-09-2017

Hi 🍎 This is my fix for broken thumbnails

This what the fix should look like

var images = document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]');
    for (i = 0; i < images.length; i++) {
        images[i].src = images[i].getAttribute('data-src');
    }

This Script Observe and Replace Broken Thumbnails , Work if Merge With Another Script

(function() {

    var observer = new MutationObserver(function() {

        document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]').each(function() {
            this.src = this.getAttribute("data-src");
        });
    });

    observer.observe(document.querySelector('.layout-column-2'), {childList: true, subtree: true, attributes: true});

})();

This Full Script

// ==UserScript==
// @name         Pixiv - Fix Broken Thumbnails
// @namespace    Fix Thumbnails on pixiv.net
// @version      1.2
// @description  Broken Thumbnails Replace
// @author       Another Dimension
// @include      http*://www.pixiv.net/*
// @icon         https://www.pixiv.net/favicon.ico
// @grant        none
// ==/UserScript==

(function() {

    var observer = new MutationObserver(function() {

        document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]').each(function() {
            this.src = this.getAttribute("data-src");
        });
    });

    observer.observe(document.querySelector('.layout-column-2'), {childList: true, subtree: true, attributes: true});

})();

§
Posted: 28-12-2016

Hey thanks for the help! Do you mind clarifying where to insert this? I'm not really fluent with javascript, tried pasting in a few spots and keep breaking the script :P

pks
§
Posted: 29-12-2016
Edited: 04-01-2017

javascript:(function()%7Bfunction%20fixThumb()%20%7Bvar%20aThumb%20%3D%20document.querySelectorAll('img._thumbnail.ui-scroll-view%5Bsrc%24%3D%5C'transparent.gif%5C'%5D')%3Bfor%20(var%20i%20%3D%200%3B%20i%20%3C%20aThumb.length%3B%20i%2B%2B)%7BaThumb%5Bi%5D.src%20%3D%20aThumb%5Bi%5D.getAttribute('data-src')%3B%7D%7DfixThumb()%3Bdocument.querySelector('.layout-column-2').addEventListener('DOMNodeInserted'%2C%20fixThumb%2C%20true)%7D)() Try this bookmarklet, it will help. also the userscript ver:

// ==UserScript==
// @name         Pixiv++ Thumb Fix
// @namespace    [email protected]
// @version      0.2
// @description  fix the blank thumbnails of Pixiv++.
// @author       pks
// @match        http://www.pixiv.net/bookmark.php*
// @include      http://www.pixiv.net/member_illust.php*
// @grant        none
// ==/UserScript==

(function() {
    function fixThumb() {
        var aThumb = document.querySelectorAll('img.ui-scroll-view[src$=\'transparent.gif\']');
        for(var i = 0; i < aThumb.length; i++) {
            aThumb[i].src = aThumb[i].getAttribute('data-src');
        }
    }
    fixThumb();

    //document.querySelector('.layout-column-2').addEventListener('DOMNodeInserted', fixThumb, true)

    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
    var target = document.querySelector('.layout-column-2');
    var observer = new MutationObserver(fixThumb);
    var config = {
        childList: true,
        subtree: true,
        attributes: true,
    };
    observer.observe(target, config);

})();
§
Posted: 29-12-2016
Edited: 25-09-2017

Hi again @qwalter

You should insert this at the end of the script or before any (function () { //code })(); also work were the script start before the first function

I'm using a new function to not affect on the script, if you merge it with another script

(function() {

    var observer = new MutationObserver(function() {

        document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]').each(function() {
            this.src = this.getAttribute("data-src");
        });
    });

    observer.observe(document.querySelector('.layout-column-2'), {childList: true, subtree: true, attributes: true});

})();

If you like you can try this full script and should work properly

// ==UserScript==
// @name         Pixiv - Fix Broken Thumbnails
// @namespace    Fix Thumbnails on pixiv.net
// @version      1.2
// @description  Broken Thumbnails Replace
// @author       Another Dimension
// @include      http*://www.pixiv.net/*
// @icon         https://www.pixiv.net/favicon.ico
// @grant        none
// ==/UserScript==

(function() {

    var observer = new MutationObserver(function() {

        document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]').each(function() {
            this.src = this.getAttribute("data-src");
        });
    });

    observer.observe(document.querySelector('.layout-column-2'), {childList: true, subtree: true, attributes: true});

})();

Please Notes : I always test my script before share it.

§
Posted: 29-12-2016

Thanks for the script.

I noticed when using it that when viewing works with only one image it would break the thumbnail on there.

Fix is to use a different selector for the img var:

var img = $('._thumbnail.ui-scroll-view');

§
Posted: 30-12-2016
Edited: 06-01-2017

Hi @Someone

Thanks for your Suggestion

It Fixed

§
Posted: 30-12-2016

Thank you @"Another Dimension", the first version you posted worked without any problem here.

§
Posted: 30-12-2016
Edited: 30-12-2016

Thank you @razul

I'm glad I was able to help you.

Merry Christmas And Happy New Year

§
Posted: 31-12-2016

Hey OP here, pardon the slow replies! Just tried out @Another Dimension s solution and everything works as normal again so big thanks and Happy New Year to you too!

§
Posted: 31-12-2016

Just discovered this problem last night, so I'm glad to find someone already hammered out a fix. I had to use the separate-script version, and there was an initial bit of weirdness, but now it works fine.

Thanks, Another!

§
Posted: 04-01-2017

Is it just me or is the new script fix causing my browser to slow down and hang intermittently?

§
Posted: 04-01-2017

@freasygork

I don't think that happening because the script, for me i don't have any performance issues in my browser can caused by the script

I'm using Google Chrome Dev Version 57.0.2950.4

Everything working well for me

If you are using Google Chrome
Please open Google Chrome Task Manager and see any pixiv's tab how much memory using and how much javascript memory using also. and try to disable Tampermonkey Extensions to see how much this value have been changed.

§
Posted: 05-01-2017

Maybe the default 3 seconds timer is too much? I've noticed some performance issues here as well (although I have a very old computer), and after raising the timer variable to 30 seconds for testing purposes everything seems to have gotten much better. I guess I'll just see how low of a value my computer can handle.

§
Posted: 05-01-2017
Edited: 25-09-2017

Hi @razul

I edit the script and I removed the timer so now it will run with "Mutation observer"

Can you tell me if you still have any performance issues and see pixiv's tab how much memory use

(function() {

    var observer = new MutationObserver(function() {

        document.querySelectorAll('._layout-thumbnail img[src*="transparent.gif"]').each(function() {
            this.src = this.getAttribute("data-src");
        });
    });

    observer.observe(document.querySelector('.layout-column-2'), {childList: true, subtree: true, attributes: true});

})();

These fixes don't work for me, and this problem is happening since the beginning of December.

Bri
§
Posted: 06-01-2017
Edited: 06-01-2017

Thank you pks.

Your script works flawlessly for "pixiv endless pages" with "iframeLoader" set to true in the script (false by default for users trying this out). Also, had to do a quick change to..

// @include http*://www.pixiv.net/*

and remove your match & include since it will ignore areas like new illustrations otherwise.

It does not work for pixiv++ but that's fine as I don't use/like it. And it would not work on endless pages without iframeloader enabled so that's important. This is a perfect fix for me. Thank you again.


Edit: If you use all three (I got curious) then pixiv++ and endless pages will combine to form mega-endless endless pages. The moment you hit page 2 they start a game of "I'm not your friend, buddy". So be sure that IF you do this, to keep pixiv++'s other features yet use endless pages for... endless pages, that you EXCLUDE new illustrations from one of those scripts or disable one of them when you first load the page so only one is active. You've been warned.

TimidScriptAuthor
§
Posted: 07-01-2017
Edited: 07-01-2017

Hi,

This issue was already raised here: https://greasyfork.org/en/forum/discussion/13415/x

Anyhow, fixed in 3.3.96 Beta

Hi,

This issue was already raised here: https://greasyfork.org/en/forum/discussion/13415/x

Anyhow, fixed in 3.3.96 Beta

THANK YOU!

Post reply

Sign in to post a reply.