Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yidichat
Copy link
Contributor

@yidichat yidichat commented Jan 8, 2025

fixed issue #149

@yidichat
Copy link
Contributor Author

yidichat commented Jan 8, 2025

Variant a has changed so the data needs to be in a list if data.type == 1.

I don't know why the commit has so many changes.. I just removed the !isVariantA check before setting the event listener, and removed the data.id == 1 check if isVariantA

@mlarmet
Copy link

mlarmet commented Jan 10, 2025

work for me

Copy link

@trekshcool trekshcool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works!

@Soulivan71
Copy link

Doesn't work for me, Im still having infinite loading

Copy link

@Shuudy Shuudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tested it and it works perfectly

@Storm918
Copy link

Variant a has changed so the data needs to be in a list if data.type == 1.

I don't know why the commit has so many changes.. I just removed the !isVariantA check before setting the event listener, and removed the data.id == 1 check if isVariantA

How you do that on android ?

@Ntmlapute
Copy link

Can I have a tut on how to do that ? I'm new to GitHub and Coding (Like new new) it would be nice, thank you :)

@Shuudy
Copy link

Shuudy commented Jan 13, 2025

Can I have a tut on how to do that ? I'm new to GitHub and Coding (Like new new) it would be nice, thank you :)

You can just modify your src/app.js

You go from this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        if (!isVariantA) {
            this.addEventListener("message", (event) => {
                const data = event.data;

                if (data.id == 1 && data.type == 1) {
                    const newData = event.data;

                    newData.arg = [data.arg];

                    this.postMessage(newData);
                }
            });
        }
    }
}

To this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        this.addEventListener("message", (event) => {
            const data = event.data;

            if ((data.id == 1 || isVariantA) && data.type == 1) {
                const newData = event.data;

                newData.arg = [data.arg];

                this.postMessage(newData);
            }
        });
    }
}

@Ntmlapute
Copy link

Can I have a tut on how to do that ? I'm new to GitHub and Coding (Like new new) it would be nice, thank you :)

You can just modify your src/app.js

You go from this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        if (!isVariantA) {
            this.addEventListener("message", (event) => {
                const data = event.data;

                if (data.id == 1 && data.type == 1) {
                    const newData = event.data;

                    newData.arg = [data.arg];

                    this.postMessage(newData);
                }
            });
        }
    }
}

To this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        this.addEventListener("message", (event) => {
            const data = event.data;

            if ((data.id == 1 || isVariantA) && data.type == 1) {
                const newData = event.data;

                newData.arg = [data.arg];

                this.postMessage(newData);
            }
        });
    }
}

Well this worked for me, thank a lot Shuudy have an amazing day ! :)

@MajdOnline
Copy link

i did all that but it didn't work

@trekshcool
Copy link

i did all that but it didn't work

Did you reload the extension in chrome?

@Soulivan71
Copy link

i did all that but it didn't work

Same for me

@MajdOnline
Copy link

i did all that but it didn't work

Did you reload the extension in chrome?

yeah i think i just have to wait for the new update

@Davidvasseur
Copy link

Thanks the modification works for me

@ghost
Copy link

ghost commented Jan 14, 2025

Can I have a tut on how to do that ? I'm new to GitHub and Coding (Like new new) it would be nice, thank you :)

You can just modify your src/app.js

You go from this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        if (!isVariantA) {
            this.addEventListener("message", (event) => {
                const data = event.data;

                if (data.id == 1 && data.type == 1) {
                    const newData = event.data;

                    newData.arg = [data.arg];

                    this.postMessage(newData);
                }
            });
        }
    }
}

To this

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        this.addEventListener("message", (event) => {
            const data = event.data;

            if ((data.id == 1 || isVariantA) && data.type == 1) {
                const newData = event.data;

                newData.arg = [data.arg];

                this.postMessage(newData);
            }
        });
    }
}

Thanks, it works fine for me.

@Davidvasseur
Copy link

The file path is this : src/app.js

@azhqlf
Copy link

azhqlf commented Jan 14, 2025

Works perfect, ty

@SewageBoikot
Copy link

Im still really new to this and have very little understanding overall of this, but i was wondering where do i find and change all this coding stuff or whatever you call it to make the extension work. I`ve tried looking around but i cant find it. I tried to go to "src/app.js" but i still dont really know what im supposed to do

@KassCroute
Copy link

Thank you so much :))) !

@KassCroute
Copy link

KassCroute commented Jan 15, 2025

Im still really new to this and have very little understanding overall of this, but i was wondering where do i find and change all this coding stuff or whatever you call it to make the extension work. I`ve tried looking around but i cant find it. I tried to go to "src/app.js" but i still dont really know what im supposed to do

Hey @SewageBoikot

Go on your TwitchNoSub folder open the app.js file in the src folder and then remove all the code and paste this one here enjoy and then add again your extension on the browser it worked for me ;) :

var isVariantA = false;
const originalAppendChild = document.head.appendChild;

document.head.appendChild = function (element) {
    if (element.tagName === "SCRIPT") {
        if (element.src.includes("player-core-variant-a")) {
            isVariantA = true;
        }
    }

    return originalAppendChild.call(this, element);
};

const oldWorker = window.Worker;

window.Worker = class Worker extends oldWorker {
    constructor(twitchBlobUrl) {
        super(twitchBlobUrl);

        this.addEventListener("message", (event) => {
            const data = event.data;

                if ((data.id == 1 || isVariantA) && data.type == 1) {
                    const newData = event.data;

                    newData.arg = [data.arg];

                    this.postMessage(newData);
                }
        });
    }
}

@SewageBoikot
Copy link

Thank you soooo much! Been scratching my head for a week with this lol, but its finally working again

@besuper
Copy link
Owner

besuper commented Jan 15, 2025

Hello @yidichat, can you apply your update to the userscript file with the lastest version of master. And also apply the changes that was made in userscript to the src/app.js file

Copy link
Owner

@besuper besuper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@besuper besuper merged commit e4f4212 into besuper:master Jan 16, 2025
@Technogamer12
Copy link

with the modification to this part all works. Just edit the code in downloadable files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.