Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave update partially broke this #56

Open
Rowsol opened this issue Jun 2, 2023 · 18 comments
Open

Brave update partially broke this #56

Rowsol opened this issue Jun 2, 2023 · 18 comments

Comments

@Rowsol
Copy link

Rowsol commented Jun 2, 2023

it still technically works, but it requires that you toggle it off and on each time you visit youtube.

@pietervanheijningen
Copy link
Owner

Hey! For me it still works. So it's probably an A/B test from youtube, which makes this a bit hard to test.

Can you make a screenshot of the HTML of the thumbnail that has not changed? Like so: with inspect element

image

Then i should be able to figure out why it is not changing for you. Probably the src url in the img tag is different on your youtube version.

Thanks!

@Rowsol
Copy link
Author

Rowsol commented Jun 2, 2023

I hope this helps
Screenshot (348)

@pietervanheijningen
Copy link
Owner

Sorry did not explain it clearly, can you also expand the yt-image HTML tag? So I can see the actual image URL? like on my screenshot

@Rowsol
Copy link
Author

Rowsol commented Jun 2, 2023

I hope this is right, this stuff is a bit over my head.

Screenshot (349)

@theshatterstone
Copy link

Same here. Titles still work, but the thumbnails don't until I set the toggles again. Here's the picture
Screenshot_2023-06-04_20-50-59

Also, I just noticed something. I use Firefox as well and it works perfectly on Firefox. All the screenshots posted so far are from Brave browser. It seems it might be an issue stemming from either Chromium-based browser, or from Brave itself.

@Rowsol
Copy link
Author

Rowsol commented Jun 4, 2023

Yeah, it appears to be an issue with Brave. Thanks for the heads up. I just posted a bug report on brave's github. Time will tell if they care enough to fix it.

@Rowsol Rowsol changed the title stopped working today Brave update partially broke this Jun 4, 2023
@Izofeu
Copy link

Izofeu commented Jun 4, 2023

I found a dirty fix for impatient people like me:
Edit the extension - file youtube.js:
Add

function fixfix()
{
	updateThumbnails("hq2");
}

setInterval(fixfix, 1000);

somewhere in the code and run. Dirty and bad fix, but at least makes Youtube usable.

@Rowsol
Copy link
Author

Rowsol commented Jun 6, 2023

I found a dirty fix for impatient people like me: Edit the extension - file youtube.js: Add

Can you elaborate? Where do you get this extension?

@Izofeu
Copy link

Izofeu commented Jun 6, 2023

  1. Go to %localappdata%\BraveSoftware\Brave-Browser\User Data
  2. Look for "omoinegiohhgbikclijaniebjpkeopip"
  3. Open the folder, copy 0.8_0 folder onto somewhere else
  4. Remove the extension from Brave
  5. Delete _metadata folder from the copied folder
  6. Open 0.8_0\js\youtube.js
  7. Paste the code from above somewhere into the file, I pasted it here (a fragment of code was provided):
chrome.runtime.onMessage.addListener(function (message) {
        Object.keys(message).forEach(function (change) {
            switch (change) {
                case 'preferred_thumbnail_file':
                    updateThumbnails(
                        message[change].newValue === undefined ? 'hq1' : message[change].newValue
                    );
                    break;
                case 'video_title_format':
                    updateCSS(message[change].newValue);
                    break;
            }
        })
    });
	//
        // I PASTED THE CODE HERE
        //
	function fixfix()
	{
                // REPLACE HQ2 WITH TYPE OF THUMBNAIL YOU WANT - hq1 START, hq2 MIDDLE, hq3 END
		updateThumbnails("hq2");
	}
	
	setInterval(fixfix, 1000);

        // 
        // END OF PASTED CODE
        // 

    function updateCSS(option) {

        let appendingElement = false;

        if (window.styleElement === null) {
            appendingElement = true;
            window.styleElement = document.createElement('style');
        }
  1. Open Extensions in Brave
  2. Enable Developer mode in top right
  3. Click load unpacked
  4. Select the 0.8_0 folder (that has manifest.json in it)
  5. Click load
    We need to do all these steps as extensions are signed and altering the code of signed extensions will prevent them from running.

@Rowsol
Copy link
Author

Rowsol commented Jun 6, 2023

Very much appreciated!

@pietervanheijningen
Copy link
Owner

pietervanheijningen commented Jun 6, 2023

Hi everyone, thanks for the temporary fix @Izofeu. But a proper fix should be possible, likely just something has to be changed in how the thumbnail url listeners are setup. Specifically here:

function setupThumbnailRedirectListeners(preferredThumbnailFile) {

Unfortunately the extension still works fine for me, this is probably due to an A/B test from youtube or Brave, which is why it is broken for some people. Strangely enough the URL to the thumbnail still seems to be the same, which is why I asked for the screenshots. So i'm a bit stumped on what it could possibly be, for me its just a guessing game.

Hoping someone who has this A/B test can figure it out and submit a pull request.

Edit: Only just realised for some reason you guys are only talking about the Brave browser. I'll see soon if I can also replicate the issue and fix it. Bit busy at the moment.

@Izofeu
Copy link

Izofeu commented Jun 6, 2023

Hi everyone, thanks for the temporary fix @Izofeu. But a proper fix should be possible, likely just something has to be changed in how the thumbnail url listeners are setup. Specifically here:

function setupThumbnailRedirectListeners(preferredThumbnailFile) {

Unfortunately the extension still works fine for me, this is probably due to an A/B test from youtube or Brave, which is why it is broken for some people. Strangely enough the URL to the thumbnail still seems to be the same, which is why I asked for the screenshots. So i'm a bit stumped on what it could possibly be, for me its just a guessing game.

Hoping someone who has this A/B test can figure it out and submit a pull request.

Edit: Only just realised for some reason you guys are only talking about the Brave browser. I'll see soon if I can also replicate the issue and fix it. Bit busy at the moment.

If you need any assistance in troubleshooting this issue, I'm more than happy to help. Sorry for my spaghetti fix but I'm not much of a coder 😃
I created a separate instance of Brave Browser and this doesn't happen (when I'm logged out) so looks like it's something related to my Google account.

@I-am-the-Users
Copy link

I-am-the-Users commented Jun 11, 2023

The problem is fixed after deleting these two folders.

  • %localappdata%\BraveSoftware\Brave-Browser\User Data\Default\DNR Extension Rules\omoinegiohhgbikclijaniebjpkeopip
  • %localappdata%\BraveSoftware\Brave-Browser\User Data\Default\Sync Extension Settings\omoinegiohhgbikclijaniebjpkeopip

edit: it doesn't work again...

@andrzejgrzelak
Copy link

I looked into this and I'm pretty sure it's connected to this issue:
brave/brave-browser#30854

I can confirm that if you disable&enable the extension it works until the browser restart

@pietervanheijningen
Copy link
Owner

I looked into this and I'm pretty sure it's connected to this issue: brave/brave-browser#30854

I can confirm that if you disable&enable the extension it works until the browser restart

Thanks for this finding! Almost certain that that is the issue then. Hope brave fixes it soon, Kind of odd that brave deviates from standard chromium behaviour. Don't really feel like I am doing very advanced/weird things with my extension.

@Mhowser
Copy link

Mhowser commented Jul 8, 2023

FYI DeArrow works on brave, I've been testing it out and I think I'm gonna just replace CBR with DeArrow.

@jrejaud
Copy link

jrejaud commented Sep 3, 2023

FYI DeArrow works on brave, I've been testing it out and I think I'm gonna just replace CBR with DeArrow.

Second DeArrow. I am a big fan of CBR but I think DeArrow is a bit better, total clickbait death is non-negotiable for me.

@pietervanheijningen
Copy link
Owner

pietervanheijningen commented Feb 1, 2024

Appears to be fixed in the latest brave update according to #66?

Issue on brave's side is now also closed, with people verifying that this extension now works properly again: brave/brave-browser#30854

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

No branches or pull requests

8 participants