extensions-source icon indicating copy to clipboard operation
extensions-source copied to clipboard

BoyLove 香香腐宅: Scrambled source images now being used in new titles/chapters

Open morallkat opened this issue 1 year ago • 2 comments

Source information

BoyLove / 香香腐宅 1.4.9

Source language

Chinese

Steps to reproduce

  1. Install the extension
  2. Find a title that have newly updated chapters after 2024
  3. Open in the app

Expected behavior

The image should be displayed correctly and completely E.g (part of normal image): image

Actual behavior

The image from source link now being scrambled, for the new titles/chapters uploaded after 2024. On the website, it uses the script to rearrange the images after page loaded. But since the extension just grab the source image links, the app will only get the unprocessed images.

E.g (part of scrambled image): image

Tachiyomi version

0.15.3

Android version

Android 14

Other details

When inspecting the page, Some code that might be related to rearrange the image using HTML canvas were found.

Details
function firstMergeImg(scrollTop) {

    var viewportData = $('#viewport0');
    var scrollTop = $(window).scrollTop();
    var itemofftop = $(viewportData).offset().top;
    var winHeight = window.innerHeight;
    var itemBottomOfftop = $(viewportData).offset().top + $(viewportData).height();
    var canvas0 = document.getElementById('viewport0');
    var ww0 = 1280;
    var hh0 = 1819;

    if (scrollTop + winHeight >= itemofftop && scrollTop <= itemBottomOfftop + 2000) {
        if ($(viewportData).hasClass('hasCanvas')) {

        } else {
            $(viewportData).addClass('hasCanvas');
            var num = 8;
            canvas0.width = ww0;
            canvas0.height = hh0;

            var context0 = canvas0.getContext("2d");
            var imgObject0 = new Image();
            do_mergeImg(context0, imgObject0, ww0, hh0, "/bookimages/path/to/source.webp?w=1280_1819", num);
            var canvasKeyW = $('#viewport0').width();
            var canvasKeyH = $('#viewport0').height();
            $('#viewport0').parents('.reader-cartoon-image').css('width', canvasKeyW);
            $('#viewport0').parents('.reader-cartoon-image').css('height', canvasKeyH);
        }

    } else {

        var context0 = canvas0.getContext("2d");
        $(viewportData).removeClass('hasCanvas');
        context0.clearRect(0, 0, ww0, hh0);

        var canvas0 = document.getElementById('viewport0');
        canvas0.width = 0;
        canvas0.height = 0;
    }

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • [X] I have written a short but informative title.
  • [X] I have updated the app to version 0.15.3.
  • [X] I have updated all installed extensions.
  • [X] I have tried the troubleshooting guide.
  • [X] If this is an issue with the app itself, I should be opening an issue in the app repository.
  • [X] I will fill out all of the requested information in this form.

morallkat avatar Jan 14 '24 18:01 morallkat

Hi, any update of this bug ?

HYChin avatar Jan 20 '24 09:01 HYChin

Since we're run by volunteers, making an issue does not imply that the problem will be fixed in a timely fashion. Please be patient.

beer-psi avatar Jan 20 '24 10:01 beer-psi

Hello is the issue fixed?

Morse069 avatar Jan 22 '24 10:01 Morse069

Please be patient, it is fixed when a volunteer contributes time to fix it.

beer-psi avatar Jan 22 '24 10:01 beer-psi